[SCM] libav/experimental: sgi: check maximum supported resolution
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Aug 10 16:02:33 UTC 2014
The following commit has been merged in the experimental branch:
commit e7cd53bf662a93330810981f1d057bdf2ead669e
Author: Piotr Bandurski <ami_stuff at o2.pl>
Date: Thu May 31 20:10:04 2012 +0200
sgi: check maximum supported resolution
Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c
index ab1e36f..003f6be 100644
--- a/libavcodec/sgienc.c
+++ b/libavcodec/sgienc.c
@@ -30,6 +30,12 @@
static av_cold int encode_init(AVCodecContext *avctx)
{
+ if (avctx->width > 65535 || avctx->height > 65535) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Unsupported resolution %dx%d.\n", avctx->width, avctx->height);
+ return AVERROR_INVALIDDATA;
+ }
+
avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame)
return AVERROR(ENOMEM);
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list