From ec0965be36b55624a03d20c3b24e6a7aa61d6cd2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 30 Mar 2012 19:18:42 +0200 Subject: [PATCH] cavsdec: ensure the tables have been allocated before using them Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer --- libavcodec/cavsdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index 8f87d5abcd..77b7abf5ba 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsdec.c @@ -697,6 +697,8 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size, *data_size = 0; if(!h->got_keyframe) break; + if(!h->top_qp) + break; init_get_bits(&s->gb, buf_ptr, input_size); h->stc = stc; if(decode_pic(h))