]> git.sesse.net Git - ffmpeg/commitdiff
lavf/mpegts: mark packets with TEI flag as corrupted
authorRodger Combs <rodger.combs@gmail.com>
Thu, 19 Oct 2017 06:58:10 +0000 (01:58 -0500)
committerRodger Combs <rodger.combs@gmail.com>
Thu, 14 Dec 2017 02:07:00 +0000 (20:07 -0600)
libavformat/mpegts.c

index 53cbcfb543bf38cc2c17503060784d916143ee4b..0a3ad057264475de69c5aa7c0f1dad43b4c265f3 100644 (file)
@@ -2296,6 +2296,14 @@ static int handle_packet(MpegTSContext *ts, const uint8_t *packet)
         }
     }
 
+    if (packet[1] & 0x80) {
+        av_log(ts->stream, AV_LOG_DEBUG, "Packet had TEI flag set; marking as corrupt\n");
+        if (tss->type == MPEGTS_PES) {
+            PESContext *pc = tss->u.pes_filter.opaque;
+            pc->flags |= AV_PKT_FLAG_CORRUPT;
+        }
+    }
+
     p = packet + 4;
     if (has_adaptation) {
         int64_t pcr_h;