tsdemux: Handle quirk in jp2k es header handling
authorEdward Hervey <edward@centricular.com>
Tue, 29 Aug 2017 09:14:59 +0000 (11:14 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Fri, 1 Sep 2017 08:49:36 +0000 (10:49 +0200)
commitc393f0d768a5c86dade48d991fb7d890f6dc5221
tree4cc732db4346972bc4a93dab3738b95add38f57f
parent4e239a6632ca648e3bf39b120e2d15822e5540e4
tsdemux: Handle quirk in jp2k es header handling

The jp2k specification (ITU-T T.800) specifies that the 'brat' box
has two fields and the second one (AUF2) can be set to 0 for progressive
streams.

The problem is that the mpeg-ts specification (ITU-T H.222.0 06/2012)
says that the AUF2 field is only present if the stream is interlaced

In order to cope with both situation, accept those next 32bit if the
stream is marked as progressive and those bits contain 0

https://bugzilla.gnome.org/show_bug.cgi?id=786111
gst/mpegtsdemux/tsdemux.c