After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 606949 - [playbin2] verify type of volume property before using it
[playbin2] verify type of volume property before using it
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Solaris
: Normal blocker
: 0.10.26
Assigned To: Tim-Philipp Müller
GStreamer Maintainers
Depends on: 606878
Blocks:
 
 
Reported: 2010-01-14 12:10 UTC by Tim-Philipp Müller
Modified: 2010-01-18 10:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim-Philipp Müller 2010-01-14 12:10:42 UTC
This happens because apexsink has (had) a volume property of type int and playsink doesn't check for the type and just assumes it's of type gdouble, so things may crash in g_object_set() because the vararg function arguments don't line up any longer if sizeof(double)!=sizeof(int).


+++ This bug was initially created as a clone of Bug #606878 +++

To reproduce bug I just have to use the apexsink as musicaudiosink and press on the volume symbol in Rhythmbox.  It also crashes when doing:

$ pstack core
core 'core' of 15541:	rhythmbox
-----------------  lwp# 1 / thread# 1  --------------------
 c9a648ef strchr   (807c1f0, 3fbe8bb1, 8679388, 1) + f
 c8473700 g_object_set_valist (90a1220, c346923c, 8045df8, c84742e0) + 22c
 c847430d g_object_set (90a1220, c346923c, d72571db, 3fbe8bb1, 0, 3c) + 39
 c344a926 gst_play_sink_set_volume (8eac018, d72571db, 3fbe8bb1, c3443d1a) + d2
Comment 1 Tim-Philipp Müller 2010-01-14 12:11:22 UTC
Assigning to me, already have a patch just needs some cleaning up.
Comment 2 Tim-Philipp Müller 2010-01-18 10:19:07 UTC
commit 7216605ffa14854802c3ae402b48931819a38560
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Mon Jan 18 02:08:39 2010 +0000

    playsink: when looking for sink properties, make sure they have the right type
    
    We don't want to end up setting values on elements where the property is of
    a different type than we expect. Can't transform the value either, since we
    can't really make assumptions about the scale and transform function.
    
    Fixes crashes when using playbin2 with apexsink (#606949).