[FFmpeg-devel] [PATCH 2/2] avformat/mpegts: Reset last version on continuity counter discontinuities
Michael Niedermayer
michaelni at gmx.at
Wed Apr 29 22:24:10 CEST 2015
Based on suggestion by: John Högberg <john.hogberg at ericsson.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
libavformat/mpegts.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index d707cc3..d8b5308 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -2176,6 +2176,7 @@ static int handle_packet(MpegTSContext *ts, const uint8_t *packet)
tss->last_cc = cc;
if (!cc_ok) {
+ int i;
av_log(ts->stream, AV_LOG_DEBUG,
"Continuity check failed for pid %d expected %d got %d\n",
pid, expected_cc, cc);
@@ -2183,6 +2184,10 @@ static int handle_packet(MpegTSContext *ts, const uint8_t *packet)
PESContext *pc = tss->u.pes_filter.opaque;
pc->flags |= AV_PKT_FLAG_CORRUPT;
}
+ for (i = 0; i < NB_PID_MAX; i++) {
+ if (ts->pids[i] && ts->pids[i]->type == MPEGTS_SECTION)
+ ts->pids[i]->u.section_filter.last_ver = -1;
+ }
}
p = packet + 4;
--
1.7.9.5
More information about the ffmpeg-devel
mailing list