Luca Barbato <[email protected]> writes: > If the Continuity Check fails drop the whole packet > --- > libavformat/mpegts.c | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c > index f2ae567..05bc4dc 100644 > --- a/libavformat/mpegts.c > +++ b/libavformat/mpegts.c > @@ -1267,7 +1267,10 @@ static int handle_packet(MpegTSContext *ts, const > uint8_t *packet) > cc = (packet[3] & 0xf); > cc_ok = (tss->last_cc < 0) || ((((tss->last_cc + 1) & 0x0f) == cc)); > tss->last_cc = cc; > - > + if (!cc_ok) { > + av_log(NULL, AV_LOG_WARNING, "Continuity Check Failed\n"); > + return -1; > + } > /* skip adaptation field */ > afc = (packet[3] >> 4) & 3; > p = packet + 4; > --
I still consider this overkill. The packet could contain any number of undamaged frames which would be needlessly discarded with this change. -- Måns Rullgård [email protected] _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
