[FFmpeg-cvslog] sgienc: add a limit for maximum supported resolution

Piotr Bandurski git at videolan.org
Fri Jun 1 02:33:06 CEST 2012


ffmpeg | branch: master | Piotr Bandurski <ami_stuff at o2.pl> | Thu May 31 20:10:04 2012 +0200| [59352cc219c4f933c9a83b45043ec4810c2a51ee] | committer: Michael Niedermayer

sgienc: add a limit for maximum supported resolution

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=59352cc219c4f933c9a83b45043ec4810c2a51ee
---

 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