Browse Source

sgi: check maximum supported resolution

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
tags/n2.3
Piotr Bandurski Vittorio Giovara 13 years ago
parent
commit
e7cd53bf66
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      libavcodec/sgienc.c

+ 6
- 0
libavcodec/sgienc.c View File

@@ -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);


Loading…
Cancel
Save