summaryrefslogtreecommitdiff
path: root/libavcodec/cavsdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-30 19:18:42 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-03-30 19:18:42 +0200
commitec0965be36b55624a03d20c3b24e6a7aa61d6cd2 (patch)
tree460868df651350f39706f091122a450279217dcf /libavcodec/cavsdec.c
parent2b7c0c9fe10c2c702a3f2741d0f29b284f78d1ea (diff)
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>
Diffstat (limited to 'libavcodec/cavsdec.c')
-rw-r--r--libavcodec/cavsdec.c2
1 files changed, 2 insertions, 0 deletions
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))