From f66e6839c5a9ddd67b492a38194535fcb294d584 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 28 Jul 2016 15:04:01 +0200 Subject: [PATCH] decodebin3: don't leak alternate inputs Fix leaks (including parsebin elements) with this pipeline: playbin3 uri=http://127.0.0.1:8079/defaults/exMPD_BIP_TC1/exMPD_BIP_TC1.mpd https://bugzilla.gnome.org/show_bug.cgi?id=769270 --- gst/playback/gstdecodebin3.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gst/playback/gstdecodebin3.c b/gst/playback/gstdecodebin3.c index 34d1b02796..6e45acf112 100644 --- a/gst/playback/gstdecodebin3.c +++ b/gst/playback/gstdecodebin3.c @@ -608,6 +608,7 @@ static void gst_decodebin3_dispose (GObject * object) { GstDecodebin3 *dbin = (GstDecodebin3 *) object; + GList *walk, *next; if (dbin->factories) gst_plugin_feature_list_free (dbin->factories); @@ -622,7 +623,15 @@ gst_decodebin3_dispose (GObject * object) g_clear_object (&dbin->collection); free_input (dbin, dbin->main_input); - /* FIXME : GO OVER INPUTS */ + + for (walk = dbin->other_inputs; walk; walk = next) { + DecodebinInput *input = walk->data; + + next = g_list_next (walk); + + free_input (dbin, input); + dbin->other_inputs = g_list_delete_link (dbin->other_inputs, walk); + } G_OBJECT_CLASS (parent_class)->dispose (object); }