From: Michael Smith Date: Fri, 3 Apr 2009 17:51:42 +0000 (-0700) Subject: playbin2: don't leak selector when getting current stream numbers. X-Git-Tag: 1.19.3~511^2~9787 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a0959afb011aee5473252591e995688d9aaa3545;p=platform%2Fupstream%2Fgstreamer.git playbin2: don't leak selector when getting current stream numbers. --- diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index 483e1ed..e48116a 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -1230,6 +1230,7 @@ get_current_stream_number (GstPlayBin * playbin, GPtrArray * channels) pad = g_ptr_array_index (channels, i); if ((selector = gst_pad_get_parent (pad))) { g_object_get (selector, "active-pad", ¤t, NULL); + gst_object_unref (selector); if (pad == current) { gst_object_unref (current); @@ -1242,9 +1243,6 @@ get_current_stream_number (GstPlayBin * playbin, GPtrArray * channels) } } - if (selector) - gst_object_unref (selector); - return ret; }