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.
This commit is contained in:
parent
2df53e5a7d
commit
07f49f15b1
@ -2306,13 +2306,13 @@ _src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||||||
case GST_EVENT_EOS:{
|
case GST_EVENT_EOS:{
|
||||||
GST_MANIFEST_LOCK (demux);
|
GST_MANIFEST_LOCK (demux);
|
||||||
|
|
||||||
|
gst_adaptive_demux_eos_handling (stream);
|
||||||
|
|
||||||
g_mutex_lock (&stream->fragment_download_lock);
|
g_mutex_lock (&stream->fragment_download_lock);
|
||||||
stream->download_finished = TRUE;
|
stream->download_finished = TRUE;
|
||||||
g_cond_signal (&stream->fragment_download_cond);
|
g_cond_signal (&stream->fragment_download_cond);
|
||||||
g_mutex_unlock (&stream->fragment_download_lock);
|
g_mutex_unlock (&stream->fragment_download_lock);
|
||||||
|
|
||||||
gst_adaptive_demux_eos_handling (stream);
|
|
||||||
|
|
||||||
GST_MANIFEST_UNLOCK (demux);
|
GST_MANIFEST_UNLOCK (demux);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user