From 8d10d29c2420c2580686d68316eca2ff326b5272 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Mon, 27 Feb 2017 14:54:43 -0700 Subject: [PATCH] adaptivemutex: Fix double mutex unlock https://bugzilla.gnome.org/show_bug.cgi?id=779480 --- gst-libs/gst/adaptivedemux/gstadaptivedemux.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c index 4d8c2b071f..e46dc3a4bc 100644 --- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c +++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c @@ -2983,6 +2983,11 @@ gst_adaptive_demux_stream_download_uri (GstAdaptiveDemux * demux, *http_status = stream->last_status_code; } } + + /* changing src element state might try to join the streaming thread, so + * we must not hold the manifest lock. + */ + GST_MANIFEST_UNLOCK (demux); } else { GST_MANIFEST_UNLOCK (demux); if (stream->last_ret == GST_FLOW_OK) @@ -2990,11 +2995,6 @@ gst_adaptive_demux_stream_download_uri (GstAdaptiveDemux * demux, ret = GST_FLOW_CUSTOM_ERROR; } - /* changing src element state might try to join the streaming thread, so - * we must not hold the manifest lock. - */ - GST_MANIFEST_UNLOCK (demux); - stream->src_at_ready = FALSE; gst_element_set_locked_state (stream->src, TRUE);