summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürgen Sachs <juergen.sachs@metz-ce.de>2017-04-11 13:41:48 +0200
committerEdward Hervey <bilboed@bilboed.com>2017-04-12 11:04:46 +0200
commit9684c88c601482f99697f25d6bcec5165867c0e5 (patch)
tree23b367515520ff36c90a5bcb4ff1ae9075fb1d65
parent26f9869668ec5f18e011cd6f936b6f62778b051f (diff)
qtdemux: fix: sample description index override in tfhd not evaluated
https://bugzilla.gnome.org/show_bug.cgi?id=778337
-rw-r--r--gst/isomp4/qtdemux.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
index 64277f144..41fea0c76 100644
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -3426,9 +3426,12 @@ qtdemux_parse_tfhd (GstQTDemux * qtdemux, GstByteReader * tfhd,
default_sample_duration, default_sample_size, default_sample_flags);
/* FIXME: Handle TF_SAMPLE_DESCRIPTION_INDEX properly */
- if (flags & TF_SAMPLE_DESCRIPTION_INDEX)
- if (!gst_byte_reader_skip (tfhd, 4))
+ if (flags & TF_SAMPLE_DESCRIPTION_INDEX) {
+ guint32 sample_description_index;
+ if (!gst_byte_reader_get_uint32_be (tfhd, &sample_description_index))
goto invalid_track;
+ (*stream)->stsd_sample_description_id = sample_description_index - 1;
+ }
if (flags & TF_DEFAULT_SAMPLE_DURATION)
if (!gst_byte_reader_get_uint32_be (tfhd, default_sample_duration))