[FFmpeg-devel] [PATCH] fix issue434
Måns Rullgård
mans
Mon Apr 21 01:21:07 CEST 2008
Michael Niedermayer <michaelni at gmx.at> writes:
> Hi
>
> The patch below fixes issue434, i will commit it in 24h unless mans objects
>
> Index: libavformat/mpeg.c
> ===================================================================
> --- libavformat/mpeg.c (revision 12867)
> +++ libavformat/mpeg.c (working copy)
> @@ -341,12 +341,13 @@
> if (flags & 0x01) { /* PES extension */
> pes_ext = get_byte(s->pb);
> header_len--;
> - if (pes_ext & 0x40) { /* pack header - should be zero in PS */
> - goto error_redo;
> - }
> /* Skip PES private data, program packet sequence counter and P-STD buffer */
> skip = (pes_ext >> 4) & 0xb;
> skip += skip & 0x9;
> + if (pes_ext & 0x40 || skip > header_len){
> + av_log(s, AV_LOG_WARNING, "pes_ext %X is invalid\n", pes_ext);
> + pes_ext=skip=0;
> + }
> url_fskip(s->pb, skip);
> header_len -= skip;
Workarounds for out-of-spec streams are only acceptable if explicitly
requested. Does lavf have something equivalent to lavc's
AVCodecContext.strict_std_compliance?
Remind be to bring my shotgun to Linuxtag, just in case there are any
VDR developers there.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list