summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Vrac <avrac@freebox.fr>2013-02-22 19:06:52 +0100
committerTim-Philipp Müller <tim@centricular.net>2013-03-02 14:16:35 +0000
commitf4769a1e3ac2bb7f142d292acc448485320f0960 (patch)
treee10a1852867a75fb2d5a37a7042dca42e260eb37
parent661c0d320a399bab2858f16272f4f4ab08b24daf (diff)
qtdemux: skip disabled tracks
ISO/IEC 14496-12 specifies disabled tracks should be completely ignored, so just do it. Avoids deadlock during prerolling for some files. Also prevents 'chapter' subtitle tracks from showing up. https://bugzilla.gnome.org/show_bug.cgi?id=693993 https://bugzilla.gnome.org/show_bug.cgi?id=628790
-rw-r--r--gst/isomp4/qtdemux.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
index 2eb74f876..9aa2dce50 100644
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -6471,6 +6471,9 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
|| !gst_byte_reader_get_uint24_be (&tkhd, &tkhd_flags))
goto corrupt_file;
+ if ((tkhd_flags & 1) == 0)
+ goto track_disabled;
+
/* pick between 64 or 32 bits */
value_size = tkhd_version == 1 ? 8 : 4;
if (!gst_byte_reader_skip (&tkhd, value_size * 2) ||
@@ -7629,6 +7632,12 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
return TRUE;
/* ERRORS */
+track_disabled:
+ {
+ GST_INFO_OBJECT (qtdemux, "skip disabled track");
+ g_free (stream);
+ return TRUE;
+ }
corrupt_file:
{
GST_ELEMENT_ERROR (qtdemux, STREAM, DEMUX,