diff options
author | Paul B Mahol <onemda@gmail.com> | 2016-06-19 09:43:22 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2016-06-19 09:45:29 +0200 |
commit | 8a135a55b3570441b6147c94f24c71e5c81ac916 (patch) | |
tree | e2885c0c60e659876c41065dedafb2b724bd75ef /libavcodec | |
parent | 63adb3602d3b35c5d1df14cf1e477bc458f96b7b (diff) | |
download | ffmpeg-8a135a55b3570441b6147c94f24c71e5c81ac916.tar.gz |
avcodec/magicyuv: check dimensions
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/magicyuv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/magicyuv.c b/libavcodec/magicyuv.c index cd703e7c8a..ce0ea9b84a 100644 --- a/libavcodec/magicyuv.c +++ b/libavcodec/magicyuv.c @@ -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); |