[FFmpeg-cvslog] h264dec: fix decoding problems introduced with baad01d8b4bfe63c7c4e571ed553f7845d78d9c0 .

Alexander Strasser eclipse7 at gmx.net
Mon Sep 26 01:50:44 CEST 2011


Michael Niedermayer wrote:
> ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Sep 25 23:51:32 2011 +0200| [f85c9b77712214373d09e7d608e6a9dd3b465f5e] | committer: Michael Niedermayer
> 
> h264dec: fix decoding problems introduced with baad01d8b4bfe63c7c4e571ed553f7845d78d9c0.
> This affected cases where extradata was not set.

  Thank you for fixing my mistake! I should have seen that the if wasn't
only for checking the arguments but also for skipping the call entirely
if no extradata is available.

[...]
> diff --git a/libavcodec/h264.c b/libavcodec/h264.c
> index 7d16688..3424f02 100644
> --- a/libavcodec/h264.c
> +++ b/libavcodec/h264.c
> @@ -1083,7 +1083,8 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx){
>          avctx->ticks_per_frame = 2;
>      }
>  
> -    if(ff_h264_decode_extradata(h, avctx->extradata, avctx->extradata_size))
> +    if(avctx->extradata_size > 0 && avctx->extradata &&
> +        ff_h264_decode_extradata(h, avctx->extradata, avctx->extradata_size))
>          return -1;
>  
>      if(h->sps.bitstream_restriction_flag && s->avctx->has_b_frames < h->sps.num_reorder_frames){

  Alexander


More information about the ffmpeg-cvslog mailing list