Commit 2f2bc2e2 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/webp: Check for VP8X after other VP8 chunks

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent cfbebe9d
...@@ -1423,6 +1423,10 @@ static int webp_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, ...@@ -1423,6 +1423,10 @@ static int webp_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
bytestream2_skip(&gb, chunk_size); bytestream2_skip(&gb, chunk_size);
break; break;
case MKTAG('V', 'P', '8', 'X'): case MKTAG('V', 'P', '8', 'X'):
if (s->width || s->height || *got_frame) {
av_log(avctx, AV_LOG_ERROR, "Canvas dimensions are already set\n");
return AVERROR_INVALIDDATA;
}
vp8x_flags = bytestream2_get_byte(&gb); vp8x_flags = bytestream2_get_byte(&gb);
bytestream2_skip(&gb, 3); bytestream2_skip(&gb, 3);
s->width = bytestream2_get_le24(&gb) + 1; s->width = bytestream2_get_le24(&gb) + 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment