mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/magicyuv: check dimensions
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
63adb3602d
commit
8a135a55b3
@ -309,8 +309,9 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
s->interlaced = !!(bytestream2_get_byte(&gb) & 2);
|
s->interlaced = !!(bytestream2_get_byte(&gb) & 2);
|
||||||
bytestream2_skip(&gb, 3);
|
bytestream2_skip(&gb, 3);
|
||||||
|
|
||||||
avctx->coded_width = bytestream2_get_le32(&gb);
|
if ((ret = ff_set_dimensions(avctx, bytestream2_get_le32(&gb), bytestream2_get_le32(&gb))) < 0)
|
||||||
avctx->coded_height = bytestream2_get_le32(&gb);
|
return ret;
|
||||||
|
|
||||||
slice_width = bytestream2_get_le32(&gb);
|
slice_width = bytestream2_get_le32(&gb);
|
||||||
if (slice_width != avctx->coded_width) {
|
if (slice_width != avctx->coded_width) {
|
||||||
avpriv_request_sample(avctx, "unsupported slice width: %d", slice_width);
|
avpriv_request_sample(avctx, "unsupported slice width: %d", slice_width);
|
||||||
|
Loading…
Reference in New Issue
Block a user