]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/gif.c
g723.1dec: Make postfilter user switchable
[ffmpeg] / libavcodec / gif.c
index ec4be2749bc17fb7737009a5b5ed8fff562b9dba..5cb635df1fa5b0b5688761e39c0d3e4bbafecfd5 100644 (file)
@@ -145,6 +145,11 @@ static av_cold int gif_encode_init(AVCodecContext *avctx)
 {
     GIFContext *s = avctx->priv_data;
 
+    if (avctx->width > 65535 || avctx->height > 65535) {
+        av_log(avctx, AV_LOG_ERROR, "GIF does not support resolutions above 65535x65535\n");
+        return -1;
+    }
+
     avctx->coded_frame = &s->picture;
     s->lzw = av_mallocz(ff_lzw_encode_state_size);
     if (!s->lzw)