From 9ebbce381a7d7c8477387029832f3992f4613feb Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Tue, 20 Jan 2015 14:55:05 -0300 Subject: [PATCH] adaptivedemux: do not skip the first fragment Avoid advancing fragment right after downloading the header. If it is the header, by default, don't advance to the next fragment. --- gst-libs/gst/adaptivedemux/gstadaptivedemux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c index c541b50..dcf16aa 100644 --- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c +++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c @@ -1287,6 +1287,10 @@ static GstFlowReturn gst_adaptive_demux_stream_finish_fragment_default (GstAdaptiveDemux * demux, GstAdaptiveDemuxStream * stream) { + /* No need to advance, this isn't a real fragment */ + if (G_UNLIKELY (stream->downloading_header || stream->downloading_index)) + return GST_FLOW_OK; + return gst_adaptive_demux_stream_advance_fragment (demux, stream, stream->fragment.duration); } -- 2.7.4