adaptivedemux: Don't hold locks when pushing FLUSH_START

Some actions (Qos, reconfigure, ...) might take place before we finish pushing out flush_start.

One problem would be that:
1) The QOS handling in adaptivedemux takes the MANIFEST LOCK
  That QOS event comes from basesink with its PREROLL_LOCK taken
2) FLUSH_START is sent from adaptivedemux with the MANIFEST_LOCK taken and the basesink flushing handler needs to take the PREROLL_LOCK

 => deadlock

https://bugzilla.gnome.org/show_bug.cgi?id=781320
This commit is contained in:
Edward Hervey 2017-04-14 18:16:28 +02:00 committed by Edward Hervey
parent 44ec6bb2f3
commit e00be27585

View file

@ -1544,7 +1544,9 @@ gst_adaptive_demux_handle_seek_event (GstAdaptiveDemux * demux, GstPad * pad,
GST_DEBUG_OBJECT (demux, "sending flush start");
fevent = gst_event_new_flush_start ();
gst_event_set_seqnum (fevent, seqnum);
GST_MANIFEST_UNLOCK (demux);
gst_adaptive_demux_push_src_event (demux, fevent);
GST_MANIFEST_LOCK (demux);
gst_adaptive_demux_stop_tasks (demux);
} else if ((rate > 0 && start_type != GST_SEEK_TYPE_NONE) ||