From e11a99e26a519ee7cbcd6df3f4275bb3ac6e6603 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 26 Mar 2014 07:32:43 +0100 Subject: [PATCH] hlsdemux: Set DISCONT flag on all buffers in reverse playback mode --- ext/hls/gsthlsdemux.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c index c5e30c503d..f3bb2a60d2 100644 --- a/ext/hls/gsthlsdemux.c +++ b/ext/hls/gsthlsdemux.c @@ -880,6 +880,12 @@ gst_hls_demux_stream_loop (GstHLSDemux * demux) GST_DEBUG_OBJECT (demux, "Pushing buffer %" GST_TIME_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf))); + /* Set DISCONT flag for every buffer in reverse playback mode + * as each fragment for its own has to be reversed */ + if (demux->segment.rate < 0) { + GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT); + } + demux->segment.position = GST_BUFFER_TIMESTAMP (buf); ret = gst_pad_push (demux->srcpad, buf); if (ret != GST_FLOW_OK)