qtdemux: When receiving a DISCONT buffer that does not point to a sample, remember the offset

And don't just reset everything. This makes sure that we can continue to
handle data in the following scenario:

moov: discont
moof: discont
mdat: continuous

Previously this would fail because the offset would be the accumulated offset
from moov and moof at the mdat position, while the buffer offset might be
something completely different.
This commit is contained in:
Sebastian Dröge 2016-07-28 17:58:16 +03:00
parent 3010d1ec2d
commit 45db90fdb0

View file

@ -6090,6 +6090,7 @@ gst_qtdemux_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * inbuf)
/* Reset state if it's a real discont */
demux->neededbytes = 16;
demux->state = QTDEMUX_STATE_INITIAL;
demux->offset = GST_BUFFER_OFFSET (inbuf);
}
}
/* Reverse fragmented playback, need to flush all we have before