From 87df15a214e32aec51da28db77e09577ed9c4d5f Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Wed, 3 Dec 2014 12:48:42 -0300 Subject: [PATCH] adaptivedemux: fix deadlock when stopping streams Remember to unlock the manifest's lock when leaving the download task. --- gst-libs/gst/adaptivedemux/gstadaptivedemux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c index 189412a22d..c0c9bb86d2 100644 --- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c +++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c @@ -1804,6 +1804,7 @@ gst_adaptive_demux_stream_download_loop (GstAdaptiveDemuxStream * stream) GST_OBJECT_LOCK (demux); if (demux->cancelled) { stream->last_ret = GST_FLOW_FLUSHING; + GST_MANIFEST_UNLOCK (demux); goto cancelled; } GST_OBJECT_UNLOCK (demux); @@ -1889,7 +1890,7 @@ gst_adaptive_demux_stream_download_loop (GstAdaptiveDemuxStream * stream) if (gst_adaptive_demux_has_next_period (demux)) { gst_adaptive_demux_advance_period (demux); ret = GST_FLOW_OK; - goto end; + goto end_of_manifest; } } }