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

Michael Niedermayer git at videolan.org
Mon Sep 26 00:01:20 CEST 2011


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.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f85c9b77712214373d09e7d608e6a9dd3b465f5e
---

 libavcodec/h264.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

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



More information about the ffmpeg-cvslog mailing list