From 9296b26095d2fce5b94f84ddc79221d5c0931a25 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 19 May 2016 11:16:50 +0200 Subject: [PATCH] adaptivedemux: Set DISCONT on startup, resume and after seeks Initial buffers after STREAM_START and seeks should always have the DISCONT flag set. https://bugzilla.gnome.org/show_bug.cgi?id=766650 --- gst-libs/gst/adaptivedemux/gstadaptivedemux.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c index 61111c4908..59e255bdb5 100644 --- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c +++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c @@ -881,7 +881,7 @@ gst_adaptive_demux_expose_stream (GstAdaptiveDemux * demux, stream->pending_caps = NULL; } - stream->discont = FALSE; + stream->discont = TRUE; gst_object_ref (pad); @@ -1466,6 +1466,8 @@ gst_adaptive_demux_src_event (GstPad * pad, GstObject * parent, gst_event_set_seqnum (seg_evt, demux->priv->segment_seqnum); gst_event_replace (&stream->pending_segment, seg_evt); gst_event_unref (seg_evt); + /* Make sure the first buffer after a seek has the discont flag */ + stream->discont = TRUE; } GST_ADAPTIVE_DEMUX_SEGMENT_UNLOCK (demux); @@ -2843,6 +2845,7 @@ gst_adaptive_demux_stream_download_loop (GstAdaptiveDemuxStream * stream) GST_PTR_FORMAT, seg_event); gst_pad_push_event (stream->pad, seg_event); + stream->discont = TRUE; stream->restart_download = FALSE; }