avformat/mpegts: Check adaption field control in analyze() more instead of transport_...
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 10 Apr 2016 11:08:00 +0000 (13:08 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 10 Apr 2016 11:32:25 +0000 (13:32 +0200)
transport_error_indicator is not required to be 0

Fixes probing
Fixes Ticket 4862

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/mpegts.c

index e44da1f..772fe47 100644 (file)
@@ -543,7 +543,7 @@ static int analyze(const uint8_t *buf, int size, int packet_size, int *index,
 
     for (i = 0; i < size - 3; i++) {
         if (buf[i] == 0x47 &&
-            (!probe || (!(buf[i + 1] & 0x80) && buf[i + 3] != 0x47))) {
+            (!probe || (buf[i + 3] & 0x30))) {
             int x = i % packet_size;
             stat[x]++;
             stat_all++;