summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2016-05-30 12:26:16 +0200
committerEdward Hervey <bilboed@bilboed.com>2016-05-30 12:26:16 +0200
commitf38f30ed83b23617bdcf95a934c217eb25771d40 (patch)
treec127be1e52add4c9d156e98fbbd898357e186ef4
parentef8cabd86d4fee9fbcb368677d87010cf88fcf83 (diff)
qtdemux: Fix usage of gst_adapter_get_offset()qtdemuxgap
In order to be backwards compatible with previous behaviour, make sure we don't end up using invalid offsets from the adapter
-rw-r--r--gst/isomp4/qtdemux.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
index efd096052..9ea365c56 100644
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -6346,9 +6346,11 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
"demux offset %" G_GUINT64_FORMAT " adapter offset %"
G_GUINT64_FORMAT, demux->offset,
gst_adapter_get_offset (demux->adapter));
- if (demux->upstream_format_is_time)
+ if (demux->upstream_format_is_time) {
demux->moof_offset = gst_adapter_get_offset (demux->adapter);
- else
+ if (demux->moof_offset == GST_BUFFER_OFFSET_NONE)
+ demux->moof_offset = demux->offset;
+ } else
demux->moof_offset = demux->offset;
if (!qtdemux_parse_moof (demux, data, demux->neededbytes,
demux->moof_offset, NULL)) {