aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodger Combs <rodger.combs@gmail.com>2017-10-19 01:58:10 -0500
committerRodger Combs <rodger.combs@gmail.com>2017-12-13 20:07:00 -0600
commit2e391a576c1fc2e8816990924c6e4c21ccf75a82 (patch)
tree708b3763bd72ad641719588c4d6d2ae25d6cf1ad
parentf7617d4b83c08958b373324d270c0504aa1be8ee (diff)
downloadffmpeg-2e391a576c1fc2e8816990924c6e4c21ccf75a82.tar.gz
lavf/mpegts: mark packets with TEI flag as corrupted
-rw-r--r--libavformat/mpegts.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 53cbcfb543..0a3ad05726 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -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;