h264dec: fix decoding problems introduced with baad01d8b4.

This affected cases where extradata was not set.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-09-25 23:51:32 +02:00
parent 537a9e5cc2
commit f85c9b7771

View File

@ -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){