mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
sgi: check maximum supported resolution
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
This commit is contained in:
parent
a7dbfcf6cb
commit
e7cd53bf66
@ -30,6 +30,12 @@
|
|||||||
|
|
||||||
static av_cold int encode_init(AVCodecContext *avctx)
|
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();
|
avctx->coded_frame = av_frame_alloc();
|
||||||
if (!avctx->coded_frame)
|
if (!avctx->coded_frame)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user