summaryrefslogtreecommitdiff
path: root/gst-libs/gst
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2016-08-04 04:29:38 +1000
committerJan Schmidt <jan@centricular.com>2016-08-04 04:29:38 +1000
commit07f49f15b1196cc9fa0d45af91149a35fce123b9 (patch)
tree66779deb2f64e80da4a060dfe6c309bffb0a0d87 /gst-libs/gst
parent2df53e5a7df3cdc18167d6949b082b10543f35fb (diff)
downloadgstreamer-plugins-bad-07f49f15b1196cc9fa0d45af91149a35fce123b9.tar.gz
adaptivedemux: On EOS, handle it before waking download loop
Otherwise, if the download loop wakes too quickly, it might miss the last_ret value update from the processing thread and loop again.
Diffstat (limited to 'gst-libs/gst')
-rw-r--r--gst-libs/gst/adaptivedemux/gstadaptivedemux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
index 7ce861bd2..42be3e030 100644
--- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
+++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
@@ -2306,13 +2306,13 @@ _src_event (GstPad * pad, GstObject * parent, GstEvent * event)
case GST_EVENT_EOS:{
GST_MANIFEST_LOCK (demux);
+ gst_adaptive_demux_eos_handling (stream);
+
g_mutex_lock (&stream->fragment_download_lock);
stream->download_finished = TRUE;
g_cond_signal (&stream->fragment_download_cond);
g_mutex_unlock (&stream->fragment_download_lock);
- gst_adaptive_demux_eos_handling (stream);
-
GST_MANIFEST_UNLOCK (demux);
break;
}