playbin: Don't leak input-selector sinkpads

https://bugzilla.gnome.org/show_bug.cgi?id=736861
This commit is contained in:
Andrei Sarakeev 2014-09-18 12:29:37 +04:00 committed by Sebastian Dröge
parent 3592bd577c
commit 2133a98eb1

View file

@ -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);