From f85c9b77712214373d09e7d608e6a9dd3b465f5e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 25 Sep 2011 23:51:32 +0200 Subject: [PATCH] h264dec: fix decoding problems introduced with baad01d8b4bfe63c7c4e571ed553f7845d78d9c0. This affected cases where extradata was not set. Signed-off-by: Michael Niedermayer --- libavcodec/h264.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 7d16688e4f..3424f02406 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){