diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c index ea0e0594b5..4f97d9227c 100644 --- a/libavcodec/wmv2dec.c +++ b/libavcodec/wmv2dec.c @@ -141,6 +141,21 @@ int ff_wmv2_decode_picture_header(MpegEncContext *s) if (s->qscale <= 0) return AVERROR_INVALIDDATA; + if (s->pict_type != AV_PICTURE_TYPE_I && show_bits(&s->gb, 1)) { + GetBitContext gb = s->gb; + int skip_type = get_bits(&gb, 2); + int run = skip_type == SKIP_TYPE_COL ? s->mb_width : s->mb_height; + + while (run > 0) { + int block = FFMIN(run, 25); + if (get_bits(&gb, block) + 1 != 1<