summaryrefslogtreecommitdiff
path: root/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
diff options
context:
space:
mode:
authorThiago Santos <thiagoss@osg.samsung.com>2015-01-20 14:55:05 -0300
committerThiago Santos <thiagoss@osg.samsung.com>2015-01-20 14:55:05 -0300
commit9ebbce381a7d7c8477387029832f3992f4613feb (patch)
tree1754f91d088e7a9671c4bcb491745312531e4185 /gst-libs/gst/adaptivedemux/gstadaptivedemux.c
parent8aaea3931cae20e855ca8dc94262e6a9a980e69d (diff)
downloadgstreamer-plugins-bad-9ebbce381a7d7c8477387029832f3992f4613feb.tar.gz
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.
Diffstat (limited to 'gst-libs/gst/adaptivedemux/gstadaptivedemux.c')
-rw-r--r--gst-libs/gst/adaptivedemux/gstadaptivedemux.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
index c541b5042..dcf16aaf3 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);
}