aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorPiotr Bandurski <ami_stuff@o2.pl>2012-05-31 20:10:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-01 01:14:49 +0200
commit59352cc219c4f933c9a83b45043ec4810c2a51ee (patch)
tree7fe32e98dbf65900cee02d36300c416f4f6970fb /libavcodec
parent8a0efa9cc075523b09b4a0585389df865996c214 (diff)
downloadffmpeg-59352cc219c4f933c9a83b45043ec4810c2a51ee.tar.gz
sgienc: add a limit for maximum supported resolution
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/sgienc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c
index d35c7ac5d1..8bb0aba1af 100644
--- a/libavcodec/sgienc.c
+++ b/libavcodec/sgienc.c
@@ -36,6 +36,11 @@ static av_cold int encode_init(AVCodecContext *avctx)
{
SgiContext *s = avctx->priv_data;
+ if (avctx->width > 65535 || avctx->height > 65535) {
+ av_log(avctx, AV_LOG_ERROR, "SGI does not support resolutions above 65535x65535\n");
+ return -1;
+ }
+
avcodec_get_frame_defaults(&s->picture);
avctx->coded_frame = &s->picture;