diff options
author | Edward Hervey <bilboed@bilboed.com> | 2016-05-25 17:05:38 +0200 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2016-05-30 12:13:03 +0200 |
commit | 251ecc40275447143988afb05259d3359beef3c4 (patch) | |
tree | 60022784962ffa3c0f985a23ce56e49d57ec6211 | |
parent | d7adf5a4f46661bcb914d29f88872759f27edbf8 (diff) |
qtdemux: Fix check for whether the new buffer is a gap'ed sample
We actually need to make sure the returned sample has the same offset
as the input buffer since the find_index_* function will return the
sample just before the requested position.
-rw-r--r-- | gst/isomp4/qtdemux.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 03461982a..f76c46bd5 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -6077,7 +6077,9 @@ gst_qtdemux_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * inbuf) res = gst_qtdemux_find_index_for_given_media_offset_linear (demux, demux->streams[i], GST_BUFFER_OFFSET (inbuf)); - if (res != -1) { + if (res != -1 + && demux->streams[i]->samples[res].offset == + GST_BUFFER_OFFSET (inbuf)) { GST_LOG_OBJECT (demux, "new buffer corresponds to a valid sample : %" G_GUINT32_FORMAT, res); |