summaryrefslogtreecommitdiff
path: root/gst-libs/gst/adaptivedemux
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu.duponchelle@opencreed.com>2017-05-31 02:46:01 +0200
committerEdward Hervey <bilboed@bilboed.com>2017-06-01 15:27:07 +0200
commit694da006e041cfd3fa1247525f21fdaedebac446 (patch)
tree938ad4aa2f7558412ae1c5e02132318bd18c5b0b /gst-libs/gst/adaptivedemux
parent2b401de91c26924a0aa8e7d36f2f16eed2dad47d (diff)
downloadgstreamer-plugins-bad-694da006e041cfd3fa1247525f21fdaedebac446.tar.gz
adaptivedemux: release the manifest lock ...
before broadcasting preroll. The deadlock was as follows: -> The subclass pushes a buffer on a newly-created stream in T1 -> We take the preroll lock in T1, to handle_preroll -> The demuxer is stopped in T2, we take the MANIFEST_LOCK -> T1 starts blocking because it received a reconfigure event and needs to take the MANIFEST_LOCK -> T2 deadlocks because it now wants the preroll_lock. https://bugzilla.gnome.org/show_bug.cgi?id=783255
Diffstat (limited to 'gst-libs/gst/adaptivedemux')
-rw-r--r--gst-libs/gst/adaptivedemux/gstadaptivedemux.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
index 0d7f4228f..c410288f3 100644
--- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
+++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
@@ -2061,9 +2061,11 @@ gst_adaptive_demux_stop_tasks (GstAdaptiveDemux * demux, gboolean stop_updates)
g_mutex_unlock (&stream->fragment_download_lock);
}
+ GST_MANIFEST_UNLOCK (demux);
g_mutex_lock (&demux->priv->preroll_lock);
g_cond_broadcast (&demux->priv->preroll_cond);
g_mutex_unlock (&demux->priv->preroll_lock);
+ GST_MANIFEST_LOCK (demux);
g_mutex_lock (&demux->priv->manifest_update_lock);
g_cond_broadcast (&demux->priv->manifest_cond);