From b18e5c031c088269b3f01d2cdb84b0ff9a305c35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= <Reimar.Doeffinger@gmx.de> Date: Tue, 16 Jan 2007 17:46:26 +0000 Subject: [PATCH] Avoid calling decode_slice when context_initialized is not set. Avoids a crash due to dsp.clear_blocks being NULL when called. Originally committed as revision 7547 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/h264.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 451a2af5bcb..2acab45b177 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -8067,6 +8067,7 @@ static int decode_nal_units(H264Context *h, uint8_t *buf, int buf_size){ h->inter_gb_ptr= &h->inter_gb; if(h->redundant_pic_count==0 && h->intra_gb_ptr && s->data_partitioning + && s->context_initialized && s->hurry_up < 5 && (avctx->skip_frame < AVDISCARD_NONREF || h->nal_ref_idc) && (avctx->skip_frame < AVDISCARD_BIDIR || h->slice_type!=B_TYPE) -- GitLab