mssdemux: do not push event holding object lock

Can lead to deadlocks as the push might block downstream in
serialized event cases.
This commit is contained in:
Thiago Santos 2013-12-19 14:30:13 -03:00
parent aa61251371
commit ff1e88ce93

View file

@ -1180,7 +1180,7 @@ gst_mss_demux_download_loop (GstMssDemuxStream * stream)
case GST_FLOW_EOS:
GST_DEBUG_OBJECT (stream->pad, "EOS, stopping download loop");
gst_mss_demux_stream_push_event (stream, gst_event_new_eos ());
/* we push the EOS after releasing the object lock */
gst_task_pause (stream->download_task);
break;
@ -1224,6 +1224,10 @@ gst_mss_demux_download_loop (GstMssDemuxStream * stream)
}
GST_OBJECT_UNLOCK (mssdemux);
if (G_UNLIKELY (ret == GST_FLOW_EOS)) {
gst_mss_demux_stream_push_event (stream, gst_event_new_eos ());
}
if (buffer_downloaded) {
stream->download_error_count = 0;
gst_mss_stream_advance_fragment (stream->manifest_stream);