qtdemux: When receiving a DISCONT buffer that does not point to a sample, remember...
authorSebastian Dröge <sebastian@centricular.com>
Thu, 28 Jul 2016 14:58:16 +0000 (17:58 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 28 Jul 2016 14:58:16 +0000 (17:58 +0300)
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

index 675d28be09ea3e2387328087a6a1652c329c3845..93a1714d5cd33951c0a4d76ba96007131197637f 100644 (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