mpegtspacketizer: be more tolerant when parsing the adaptation field
authorMichael Olbrich <m.olbrich@pengutronix.de>
Mon, 6 Apr 2020 08:19:23 +0000 (10:19 +0200)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 7 Apr 2020 08:21:04 +0000 (08:21 +0000)
commit468408c6a6b310ccc9093a7a85996f17265d74ec
tree9accb7580e3e1d719c3fe4fa85f40b84d4e0f72c
parentb79c949789628f537f68e190a2a73817b737c34b
mpegtspacketizer: be more tolerant when parsing the adaptation field

According to the specification, the adaptation field length must be 183 if
there is no payload data and < 183 if the packet contains an adaptation
field and payload data.

Unfortunately some payloaders always set the flag for payload data, even if
the adaptation field length is 183.

Don't return with an error in this case. Clear the payload data flag
instead and parse the adaptation field as usual. This avoids visual
artefacts for such streams.
gst/mpegtsdemux/mpegtspacketizer.c