h264dec: fix decoding problems introduced with baad01d8b4.

This affected cases where extradata was not set.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/2/head
Michael Niedermayer 14 years ago
parent 537a9e5cc2
commit f85c9b7771
  1. 3
      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){

Loading…
Cancel
Save