On Fri, Jun 24, 2011 at 09:33:57 (CEST), Luca Barbato wrote:

> 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;
> +    }

"Continuity Check Failed, dropping packet\n"
?

>      /* skip adaptation field */
>      afc = (packet[3] >> 4) & 3;
>      p = packet + 4;

Do we want this for 0.7.1?

-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to