cavsdec: ensure the tables have been allocated before using them

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-03-30 19:18:42 +02:00
parent 2b7c0c9fe1
commit ec0965be36
1 changed files with 2 additions and 0 deletions

View File

@ -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))