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
This commit is contained in:
Guillaume Desmottes 2016-07-28 15:04:01 +02:00 committed by Edward Hervey
parent 7ae577dc3a
commit f66e6839c5

View file

@ -608,6 +608,7 @@ static void
gst_decodebin3_dispose (GObject * object) gst_decodebin3_dispose (GObject * object)
{ {
GstDecodebin3 *dbin = (GstDecodebin3 *) object; GstDecodebin3 *dbin = (GstDecodebin3 *) object;
GList *walk, *next;
if (dbin->factories) if (dbin->factories)
gst_plugin_feature_list_free (dbin->factories); gst_plugin_feature_list_free (dbin->factories);
@ -622,7 +623,15 @@ gst_decodebin3_dispose (GObject * object)
g_clear_object (&dbin->collection); g_clear_object (&dbin->collection);
free_input (dbin, dbin->main_input); 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); G_OBJECT_CLASS (parent_class)->dispose (object);
} }