From c88125045f06a92615a01a9fc2d3c2e816e0cd2f Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Wed, 31 May 2017 03:14:04 +0200 Subject: [PATCH] adaptivedemux: make sure to free all "old streams" As we release the MANIFEST_LOCK in stop_tasks, demux->priv->old_streams can be set, we need to free these otherwise we may end up trying to dispose elements in the READY state. https://bugzilla.gnome.org/show_bug.cgi?id=783256 --- gst-libs/gst/adaptivedemux/gstadaptivedemux.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c index 2793d99941..7b82653a28 100644 --- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c +++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c @@ -810,6 +810,12 @@ gst_adaptive_demux_reset (GstAdaptiveDemux * demux) (GDestroyNotify) gst_adaptive_demux_stream_free); } + if (demux->priv->old_streams) { + g_list_free_full (demux->priv->old_streams, + (GDestroyNotify) gst_adaptive_demux_stream_free); + demux->priv->old_streams = NULL; + } + g_free (demux->manifest_uri); g_free (demux->manifest_base_uri); demux->manifest_uri = NULL;