summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2007-01-16 17:46:26 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2007-01-16 17:46:26 +0000
commitb18e5c031c088269b3f01d2cdb84b0ff9a305c35 (patch)
treef1efa04a4006251bf7a1ffec108f72589fe61202
parentb0642c74090f2ee58b452fca3c484ed83d9dd2f1 (diff)
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
-rw-r--r--libavcodec/h264.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 451a2af5bc..2acab45b17 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)