hlsdemux: Send flush start event before waiting for the tasks to finish

Otherwise we'll wait until buffers are completely processed downstream,
which might take quite some time.
This commit is contained in:
Sebastian Dröge 2014-03-26 07:22:54 +01:00
parent 91ec00a0c0
commit cad284e843

View file

@ -366,6 +366,11 @@ gst_hls_demux_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
" stop: %" GST_TIME_FORMAT, rate, GST_TIME_ARGS (start),
GST_TIME_ARGS (stop));
if (flags & GST_SEEK_FLAG_FLUSH) {
GST_DEBUG_OBJECT (demux, "sending flush start");
gst_pad_push_event (demux->srcpad, gst_event_new_flush_start ());
}
gst_hls_demux_pause_tasks (demux);
/* wait for streaming to finish */
@ -433,11 +438,6 @@ gst_hls_demux_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
current_sequence++;
}
if (flags & GST_SEEK_FLAG_FLUSH) {
GST_DEBUG_OBJECT (demux, "sending flush start");
gst_pad_push_event (demux->srcpad, gst_event_new_flush_start ());
}
GST_M3U8_CLIENT_LOCK (demux->client);
GST_DEBUG_OBJECT (demux, "seeking to sequence %u",
(guint) current_sequence);