From 2133a98eb1ad5953ab1d88ed9430d19276f0d5b1 Mon Sep 17 00:00:00 2001 From: Andrei Sarakeev Date: Thu, 18 Sep 2014 12:29:37 +0400 Subject: [PATCH] playbin: Don't leak input-selector sinkpads https://bugzilla.gnome.org/show_bug.cgi?id=736861 --- gst/playback/gstplaybin2.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index 03e20df33e..40d90b576c 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -1921,6 +1921,9 @@ gst_play_bin_set_current_video_stream (GstPlayBin * playbin, gint stream) g_object_set (combiner, "active-pad", sinkpad, NULL); } + if (old_sinkpad) + gst_object_unref (old_sinkpad); + gst_object_unref (combiner); } gst_object_unref (sinkpad); @@ -1987,6 +1990,10 @@ gst_play_bin_set_current_audio_stream (GstPlayBin * playbin, gint stream) /* activate the selected pad */ g_object_set (combiner, "active-pad", sinkpad, NULL); } + + if (old_sinkpad) + gst_object_unref (old_sinkpad); + gst_object_unref (combiner); } gst_object_unref (sinkpad);