|
|
@@ -33,6 +33,7 @@ |
|
|
static int parse_mb_skip(Wmv2Context *w) |
|
|
static int parse_mb_skip(Wmv2Context *w) |
|
|
{ |
|
|
{ |
|
|
int mb_x, mb_y; |
|
|
int mb_x, mb_y; |
|
|
|
|
|
int coded_mb_count = 0; |
|
|
MpegEncContext *const s = &w->s; |
|
|
MpegEncContext *const s = &w->s; |
|
|
uint32_t *const mb_type = s->current_picture_ptr->mb_type; |
|
|
uint32_t *const mb_type = s->current_picture_ptr->mb_type; |
|
|
|
|
|
|
|
|
@@ -83,6 +84,14 @@ static int parse_mb_skip(Wmv2Context *w) |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (mb_y = 0; mb_y < s->mb_height; mb_y++) |
|
|
|
|
|
for (mb_x = 0; mb_x < s->mb_width; mb_x++) |
|
|
|
|
|
coded_mb_count += !IS_SKIP(mb_type[mb_y * s->mb_stride + mb_x]); |
|
|
|
|
|
|
|
|
|
|
|
if (coded_mb_count > get_bits_left(&s->gb)) |
|
|
|
|
|
return AVERROR_INVALIDDATA; |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|