diff options
Diffstat (limited to 'libavcodec/rv40.c')
-rw-r--r-- | libavcodec/rv40.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/rv40.c b/libavcodec/rv40.c index 8c157fe18d..0222983087 100644 --- a/libavcodec/rv40.c +++ b/libavcodec/rv40.c @@ -231,8 +231,11 @@ static int rv40_decode_mb_info(RV34DecContext *r) int blocks[RV34_MB_TYPES] = {0}; int count = 0; - if(!r->s.mb_skip_run) + if(!r->s.mb_skip_run) { r->s.mb_skip_run = svq3_get_ue_golomb(gb) + 1; + if(r->s.mb_skip_run > (unsigned)s->mb_num) + return -1; + } if(--r->s.mb_skip_run) return RV34_MB_SKIP; |