adaptivedemux: do not skip the first fragment
authorThiago Santos <thiagoss@osg.samsung.com>
Tue, 20 Jan 2015 17:55:05 +0000 (14:55 -0300)
committerThiago Santos <thiagoss@osg.samsung.com>
Tue, 20 Jan 2015 17:55:05 +0000 (14:55 -0300)
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

index c541b50..dcf16aa 100644 (file)
@@ -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);
 }