[FFmpeg-cvslog] h264: Return the correct number of bytes for mid strea, extradata.

Michael Niedermayer git at videolan.org
Tue Jan 31 22:00:01 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jan 29 21:06:09 2012 +0100| [e4a714f65a0c9e03d6e5dd57a3d4a0451e193f55] | committer: Michael Niedermayer

h264: Return the correct number of bytes for mid strea, extradata.

Fixes the hang with Ticket952

Tested-by: Nicolas George <nicolas.george at normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 962b5dc..a4892ac 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1125,7 +1125,7 @@ int ff_h264_decode_extradata(H264Context *h, const uint8_t *buf, int size)
         if(decode_nal_units(h, buf, size) < 0)
             return -1;
     }
-    return 0;
+    return size;
 }
 
 av_cold int ff_h264_decode_init(AVCodecContext *avctx){
@@ -1170,7 +1170,7 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx){
     }
 
     if(avctx->extradata_size > 0 && avctx->extradata &&
-        ff_h264_decode_extradata(h, avctx->extradata, avctx->extradata_size))
+        ff_h264_decode_extradata(h, avctx->extradata, avctx->extradata_size)<0)
         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