From cad284e8432ce65a597ffde580cedfa93f07c5bc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 26 Mar 2014 07:22:54 +0100 Subject: [PATCH] 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. --- ext/hls/gsthlsdemux.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c index 2ce7c27..eab3657 100644 --- a/ext/hls/gsthlsdemux.c +++ b/ext/hls/gsthlsdemux.c @@ -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); -- 2.7.4