[FFmpeg-cvslog] avcodec/magicyuv: check dimensions
Paul B Mahol
git at videolan.org
Sun Jun 19 09:45:54 CEST 2016
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Jun 19 09:43:22 2016 +0200| [8a135a55b3570441b6147c94f24c71e5c81ac916] | committer: Paul B Mahol
avcodec/magicyuv: check dimensions
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8a135a55b3570441b6147c94f24c71e5c81ac916
---
libavcodec/magicyuv.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavcodec/magicyuv.c b/libavcodec/magicyuv.c
index cd703e7..ce0ea9b 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);
More information about the ffmpeg-cvslog
mailing list