Commit e7cd53bf authored by Piotr Bandurski's avatar Piotr Bandurski Committed by Vittorio Giovara

sgi: check maximum supported resolution

Signed-off-by: 's avatarVittorio Giovara <vittorio.giovara@gmail.com>
parent a7dbfcf6
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment