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
This commit is contained in:
Arnaud Vrac 2013-02-22 19:06:52 +01:00 committed by Tim-Philipp Müller
parent 0427524d73
commit 1cff6427f1

View file

@ -6474,6 +6474,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) ||
@ -7646,6 +7649,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,