mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
decodebin3: Fix list leak on handle_stream_switch()
Free no more used list variables https://bugzilla.gnome.org/show_bug.cgi?id=775553
This commit is contained in:
parent
44bc10219c
commit
e6ee68a34f
1 changed files with 18 additions and 2 deletions
|
@ -2339,6 +2339,7 @@ handle_stream_switch (GstDecodebin3 * dbin, GList * select_streams,
|
|||
g_list_free (to_deactivate);
|
||||
g_list_free (pending_streams);
|
||||
to_deactivate = NULL;
|
||||
pending_streams = NULL;
|
||||
} else {
|
||||
if (dbin->requested_selection)
|
||||
g_list_free_full (dbin->requested_selection, g_free);
|
||||
|
@ -2349,14 +2350,16 @@ handle_stream_switch (GstDecodebin3 * dbin, GList * select_streams,
|
|||
g_list_copy_deep (pending_streams, (GCopyFunc) g_strdup, NULL));
|
||||
if (dbin->to_activate)
|
||||
g_list_free (dbin->to_activate);
|
||||
dbin->to_activate = to_reassign;
|
||||
dbin->to_activate = g_list_copy (to_reassign);
|
||||
}
|
||||
|
||||
dbin->selection_updated = TRUE;
|
||||
SELECTION_UNLOCK (dbin);
|
||||
|
||||
if (unknown)
|
||||
if (unknown) {
|
||||
GST_FIXME_OBJECT (dbin, "Got request for an unknown stream");
|
||||
g_list_free (unknown);
|
||||
}
|
||||
|
||||
/* For all streams to deactivate, add an idle probe where we will do
|
||||
* the unassignment and switch over */
|
||||
|
@ -2366,6 +2369,19 @@ handle_stream_switch (GstDecodebin3 * dbin, GList * select_streams,
|
|||
(GstPadProbeCallback) slot_unassign_probe, slot, NULL);
|
||||
}
|
||||
|
||||
if (to_deactivate)
|
||||
g_list_free (to_deactivate);
|
||||
if (to_activate)
|
||||
g_list_free (to_activate);
|
||||
if (to_reassign)
|
||||
g_list_free (to_reassign);
|
||||
if (future_request_streams)
|
||||
g_list_free (future_request_streams);
|
||||
if (pending_streams)
|
||||
g_list_free (pending_streams);
|
||||
if (slots_to_reassign)
|
||||
g_list_free (slots_to_reassign);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue