From 45db90fdb03ea53484f331deb4989c303fe8bbcb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 28 Jul 2016 17:58:16 +0300 Subject: [PATCH] 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. --- gst/isomp4/qtdemux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 675d28b..93a1714 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -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 -- 2.7.4