GNOME Bugzilla – Bug 592884
[playbin2] g_object_get increases refcount by 2 and therefore leaves memleak
Last modified: 2009-08-24 13:09:23 UTC
looks as if gst_play_bin_get_current_sink does a g_object_ref and g_value_set_object does too which results in the refcount being increased by 2. therefore this requires double unref'ing to avoid memory leaking. this call invokes the issue: g_object_get (G_OBJECT (m_gst_playbin), "audio-sink", &sink, NULL);
Created attachment 141550 [details] [review] possible fix
commit c3ebeec5a54c6c00bf30f7196968a9369c3d8205 Author: Wim Taymans <wim.taymans@collabora.co.uk> Date: Mon Aug 24 15:06:28 2009 +0200 playbin2: fix refcounting of _get_sink() g_value_set_object() increases the refcount of the sink, which is not needed because the object should already be refcounted. Make sure this is always the case and use g_value_take_object(). Fixes: #592884