Commit 58e30337 authored by Edward Hervey's avatar Edward Hervey Committed by Edward Hervey
Browse files

qtdemux: Reset adapter in more discontinuity cases

In push mode we process as much as possible in the adapter. When we receive
a DISCONT buffer which we can't match to an actual sample (based on the existing
sample table) and there is still data remaining in the incoming adapter,there is
one of two cases happening:
1) We are doing reverse playback, in which case we should flush out all pending
2) We have leftover data from the previous incoming buffer... which we can't do
  anything about.

For the second case, make sure we flush out the remaining data so that we can start
parsing again from scratch.
parent 474819cc
......@@ -6326,10 +6326,12 @@ gst_qtdemux_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * inbuf)
if (!is_gap_input) {
GST_DEBUG_OBJECT (demux, "Resetting, actual DISCONT");
/* Reset state if it's a real discont */
demux->neededbytes = 16;
demux->offset = GST_BUFFER_OFFSET (inbuf);
gst_adapter_clear (demux->adapter);
/* Reverse fragmented playback, need to flush all we have before
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment