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 761637 - qtmux: handle file with wrong color_table_id values
qtmux: handle file with wrong color_table_id values
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal enhancement
: 1.6.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
1.6.4
Depends on:
Blocks:
 
 
Reported: 2016-02-06 13:47 UTC by Matej Knopp
Modified: 2016-04-14 17:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to check if color table is actually present (1.20 KB, patch)
2016-02-06 13:47 UTC, Matej Knopp
none Details | Review
Patch to check if color table is actually present (1.20 KB, patch)
2016-02-06 13:51 UTC, Matej Knopp
none Details | Review
Patch to check if color table is actually present (1.20 KB, patch)
2016-02-06 13:57 UTC, Matej Knopp
none Details | Review
Patch to check if color table is actually present (1.21 KB, patch)
2016-02-06 14:00 UTC, Matej Knopp
committed Details | Review

Description Matej Knopp 2016-02-06 13:47:05 UTC
Created attachment 320545 [details] [review]
Patch to check if color table is actually present

I got my hands on a file created by TPMGEnc that has color_table_id = 0, but no actual color table. While this violates the specification, there are obviously files like this out there and no other player chokes on them, so gstreamer should be able to handle them as well.

Sample file
http://s3.amazonaws.com/MatejK/Samples/invalid-color-table-id.mp4

Specification

Color table ID
A 16-bit integer that identifies which color table to use. If this field is set to –1, the default color table should be used for the specified depth. For all depths below 16 bits per pixel, this indicates a standard Macintosh color table for the specified depth. Depths of 16, 24, and 32 have no color table.

If the color table ID is set to 0, a color table is contained within the sample description itself. The color table immediately follows the color table ID field in the sample description. See Color Table Atoms for a complete description of a color table.

https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html
Comment 1 Matej Knopp 2016-02-06 13:51:59 UTC
Created attachment 320546 [details] [review]
Patch to check if color table is actually present
Comment 2 Matej Knopp 2016-02-06 13:57:07 UTC
Created attachment 320547 [details] [review]
Patch to check if color table is actually present

Fixes typo in comment
Comment 3 Matej Knopp 2016-02-06 14:00:00 UTC
Created attachment 320548 [details] [review]
Patch to check if color table is actually present

Fixes even more typos.
Comment 4 Tim-Philipp Müller 2016-02-19 16:08:11 UTC
Thanks, pushed (with minor reformatting, wrapped the long comment line and the if clause)

commit f96c9eb6bc8e1cf0e6191e1acf525b19ca5000d4
Author: Matej Knopp <matej.knopp@gmail.com>
Date:   Sat Feb 6 14:39:05 2016 +0100

    qtdemux: workaround for files with wrong color_table_id value
    
    Instead of erroring out, just use the default color table.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761637