[FFmpeg-cvslog] sgienc: add a limit for maximum supported resolution
Piotr Bandurski
git at videolan.org
Thu Jun 7 01:44:19 CEST 2012
ffmpeg | branch: release/0.11 | Piotr Bandurski <ami_stuff at o2.pl> | Thu May 31 20:10:04 2012 +0200| [ac3fc94eb0f79685a3e10363032d68142b15e368] | committer: Michael Niedermayer
sgienc: add a limit for maximum supported resolution
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 59352cc219c4f933c9a83b45043ec4810c2a51ee)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ac3fc94eb0f79685a3e10363032d68142b15e368
---
libavcodec/sgienc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c
index d35c7ac..8bb0aba 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;
More information about the ffmpeg-cvslog
mailing list