Commit 8a135a55 authored by Paul B Mahol's avatar Paul B Mahol

avcodec/magicyuv: check dimensions

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 63adb360
......@@ -309,8 +309,9 @@ static int decode_frame(AVCodecContext *avctx,
s->interlaced = !!(bytestream2_get_byte(&gb) & 2);
bytestream2_skip(&gb, 3);
avctx->coded_width = bytestream2_get_le32(&gb);
avctx->coded_height = bytestream2_get_le32(&gb);
if ((ret = ff_set_dimensions(avctx, bytestream2_get_le32(&gb), bytestream2_get_le32(&gb))) < 0)
return ret;
slice_width = bytestream2_get_le32(&gb);
if (slice_width != avctx->coded_width) {
avpriv_request_sample(avctx, "unsupported slice width: %d", slice_width);
......
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