After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 704007 - qtdemux: skips disabled tracks
qtdemux: skips disabled tracks
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal normal
: 1.1.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-07-11 14:17 UTC by Matej Knopp
Modified: 2013-07-12 09:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (6.08 KB, patch)
2013-07-11 14:17 UTC, Matej Knopp
committed Details | Review

Description Matej Knopp 2013-07-11 14:17:27 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.
Comment 1 Tim-Philipp Müller 2013-07-11 14:20:48 UTC
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..
Comment 2 Matej Knopp 2013-07-11 14:27:56 UTC
I also think there is, but it is buried deep somewhere and IIRC the disabled tracks behavior was just a byproduct.
Comment 3 Sebastian Dröge (slomo) 2013-07-12 08:24:16 UTC
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?
Comment 4 Matej Knopp 2013-07-12 09:38:31 UTC
> 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.
Comment 5 Sebastian Dröge (slomo) 2013-07-12 09:46:48 UTC
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