GNOME Bugzilla – Bug 704007
qtdemux: skips disabled tracks
Last modified: 2013-07-12 09:47:07 UTC
Created attachment 248929 [details] [review] Patch This behavior has been added to handle chapter tracks (which were otherwise displayed as subtitle tracks), but it is not proper way to handle chapter tracks. Also it is inconsistent with both VLC and QuickTime (X). VLC has tracks with disabled flags disabled as default but allows to enable such track. QuickTime does the same for subtitle track. Attached patch sets GST_STREAM_FLAG_UNSELECT flag on stream instead of ignoring it completely and detects chapters track using the CHAP atom.
Hrm, I think there's another bug about this somewhere :) One problem might be that playbin doesn't actually do anything with those flags yet..
I also think there is, but it is buried deep somewhere and IIRC the disabled tracks behavior was just a byproduct.
Review of attachment 248929 [details] [review]: ::: gst/isomp4/qtdemux.c @@ +7018,3 @@ + if (length >= 12) { + qtdemux->chapters_track_id = + GST_READ_UINT32_BE ((gint8 *) chap->data + 8); Couldn't there be multiple chapters tracks? @@ +8387,3 @@ + if ((stream->subtype == FOURCC_text || stream->subtype == FOURCC_sbtl) && + stream->track_id == qtdemux->chapters_track_id) { Why are chapters tracks shown as subtitle tracks at all?
> Couldn't there be multiple chapters tracks? In theory there could but I haven't seen such file in wild (not sure what the point would be). libav also only checks for one track. That said, I have no problem adding checks for multiple chapter tracks if required. >Why are chapters tracks shown as subtitle tracks at all? Chapter track is a subtitle track with one cue per chapter. The CHAP atom is used to determine whether the track is a regular subtitle track or contains chapters.
Fine then, I added a GST_FIXME_OBJECT() there to warn if we ever encounter a file with multiple CHAPs :) commit 3111161e8afe47de44aad8b3bbac659da185bad4 Author: Matej Knopp <matej.knopp@gmail.com> Date: Thu Jul 11 16:13:05 2013 +0200 qtdemux: unselect instead of ignoring disabled track, detect chapter track https://bugzilla.gnome.org/show_bug.cgi?id=704007