diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-25 23:51:32 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-25 23:51:32 +0200 |
commit | f85c9b77712214373d09e7d608e6a9dd3b465f5e (patch) | |
tree | 999c54d01cf382e13a01b17f85c5977ff1520f09 | |
parent | 537a9e5cc28fe55deedc30953737cff124ac570f (diff) | |
download | ffmpeg-f85c9b77712214373d09e7d608e6a9dd3b465f5e.tar.gz |
h264dec: fix decoding problems introduced with baad01d8b4bfe63c7c4e571ed553f7845d78d9c0.
This affected cases where extradata was not set.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/h264.c | 3 |
1 files changed, 2 insertions, 1 deletions
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){ |