adaptivemutex: Fix double mutex unlock
authorThomas Bluemel <tbluemel@control4.com>
Mon, 27 Feb 2017 21:54:43 +0000 (14:54 -0700)
committerSebastian Dröge <sebastian@centricular.com>
Fri, 17 Mar 2017 10:29:01 +0000 (12:29 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=779480

gst-libs/gst/adaptivedemux/gstadaptivedemux.c

index e5b11a4c2815abfb1e7a599f1d7d325a02f446a9..58f619535340b71368c78d6545257c322156f9e0 100644 (file)
@@ -2801,6 +2801,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)
@@ -2808,11 +2813,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);