1 Jun 2012 02:33
sgienc: add a limit for maximum supported resolution
Piotr Bandurski <git <at> videolan.org>
2012-06-01 00:33:06 GMT
2012-06-01 00:33:06 GMT
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 <at> <at> -36,6 +36,11 <at> <at> 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;
RSS Feed