summaryrefslogtreecommitdiff
path: root/libavcodec/sgienc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/sgienc.c')
-rw-r--r--libavcodec/sgienc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c
index c22535421c..a809d5c0b2 100644
--- a/libavcodec/sgienc.c
+++ b/libavcodec/sgienc.c
@@ -31,9 +31,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);
av_log(avctx, AV_LOG_ERROR, "SGI does not support resolutions above 65535x65535\n");
- return -1;
+ return AVERROR_INVALIDDATA;
}
+
avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame)
return AVERROR(ENOMEM);