From 66202d4c1b6b9fe6eaee9233b010758634812703 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Sat, 29 Nov 2014 10:28:09 -0300 Subject: [PATCH] adaptivedemux: fix manifest update locking To avoid unlocking a not locked mutex --- gst-libs/gst/adaptivedemux/gstadaptivedemux.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c index 6e3480c5a8..e2a10e7d39 100644 --- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c +++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c @@ -2225,12 +2225,12 @@ gst_adaptive_demux_update_manifest (GstAdaptiveDemux * demux) if (ret == GST_FLOW_OK) { gst_buffer_unref (demux->priv->manifest_buffer); demux->priv->manifest_buffer = buffer; - GST_MANIFEST_UNLOCK (demux); /* Send an updated duration message */ if (klass->get_duration) { GstClockTime duration = klass->get_duration (demux); + GST_MANIFEST_UNLOCK (demux); if (duration != GST_CLOCK_TIME_NONE) { GST_DEBUG_OBJECT (demux, "Sending duration message : %" GST_TIME_FORMAT, @@ -2241,12 +2241,14 @@ gst_adaptive_demux_update_manifest (GstAdaptiveDemux * demux) GST_DEBUG_OBJECT (demux, "Duration unknown, can not send the duration message"); } + } else { + GST_MANIFEST_UNLOCK (demux); } } else { + GST_MANIFEST_UNLOCK (demux); gst_buffer_unref (buffer); /* Should the manifest uri vars be reverted to original values? */ } - GST_MANIFEST_UNLOCK (demux); } else { ret = GST_FLOW_NOT_LINKED; } -- 2.34.1