[FFmpeg-cvslog] h264: check context state before decoding slice data partitions

Janne Grunau git at videolan.org
Thu Jan 17 03:21:01 CET 2013


ffmpeg | branch: release/0.8 | Janne Grunau <janne-libav at jannau.net> | Wed Nov 28 22:17:14 2012 +0100| [ad025377462cd01c11f1fe67d087804999af9d49] | committer: Reinhard Tartler

h264: check context state before decoding slice data partitions

Fixes mov_h264_aac__Demo_FlagOfOurFathers.mov.SIGSEGV.4e9.656.

Found-by: Mateusz "j00ru" Jurczyk
CC: libav-stable at libav.org
(cherry-picked from commit c1fcf563b13051f280db169ba41c6a1b21b25e08)

Signed-off-by: Reinhard Tartler <siretart at tauware.de>

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

 libavcodec/h264.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 98c68d8..1f85eea 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3832,6 +3832,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
             hx->inter_gb_ptr= &hx->inter_gb;
 
             if(hx->redundant_pic_count==0 && hx->intra_gb_ptr && hx->s.data_partitioning
+               && s->current_picture_ptr
                && s->context_initialized
                && (avctx->skip_frame < AVDISCARD_NONREF || hx->nal_ref_idc)
                && (avctx->skip_frame < AVDISCARD_BIDIR  || hx->slice_type_nos!=AV_PICTURE_TYPE_B)



More information about the ffmpeg-cvslog mailing list