[FFmpeg-devel] [PATCH 1/4] lavf/mpegts: mark packets with TEI flag as corrupted

Michael Niedermayer michael at niedermayer.cc
Thu Dec 14 00:04:44 EET 2017


On Wed, Dec 13, 2017 at 05:44:50AM -0600, Rodger Combs wrote:
> ---
>  libavformat/mpegts.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> 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;
> +        }
> +    }

probably ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171213/940e55b1/attachment.sig>


More information about the ffmpeg-devel mailing list