summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Normand <philn@igalia.com>2018-12-22 17:55:51 +0100
committerTim-Philipp Müller <tim@centricular.com>2019-05-06 23:43:07 +0200
commit1e9a2f584aab6dc761009e73692893772ddadcde (patch)
tree371e76a53b3e8dd629af0ca1eaf94b9fb03341af
parent3c994f56469dd87057b38589274889a2d4160853 (diff)
downloadgstreamer-plugins-good-1e9a2f584aab6dc761009e73692893772ddadcde.tar.gz
qtdemux: Offset correction for track language code parsing
The duration field being a uint64, is stored in 8 bytes, not 4. So the offset of the following field, language code, needs to be updated accordingly so that the parsed language code is not garbage.
-rw-r--r--gst/isomp4/qtdemux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
index 9d771bebf..0dbced1fb 100644
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -9717,11 +9717,11 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
version = QT_UINT32 ((guint8 *) mdhd->data + 8);
GST_LOG_OBJECT (qtdemux, "track version/flags: %08x", version);
if (version == 0x01000000) {
- if (len < 38)
+ if (len < 42)
goto corrupt_file;
stream->timescale = QT_UINT32 ((guint8 *) mdhd->data + 28);
stream->duration = QT_UINT64 ((guint8 *) mdhd->data + 32);
- lang_code = QT_UINT16 ((guint8 *) mdhd->data + 36);
+ lang_code = QT_UINT16 ((guint8 *) mdhd->data + 40);
} else {
if (len < 30)
goto corrupt_file;