mpegtsdemux: adaptation field length == 0 is valid

it can be used to insert a single stuffing byte
do not parse the following payload as adaptation field
This commit is contained in:
Janne Grunau 2011-04-11 14:53:28 +02:00 committed by Edward Hervey
parent eb2470fb9e
commit 37f1decf78

View file

@ -208,6 +208,13 @@ mpegts_packetizer_parse_adaptation_field_control (MpegTSPacketizer2 *
length = *packet->data++;
/* an adaptation field with length 0 is valid and
* can be used to insert a single stuffing byte */
if (!length) {
packet->afc_flags = 0;
return TRUE;
}
if (packet->adaptation_field_control == 0x02) {
/* no payload, adaptation field of 183 bytes */
if (length != 183) {