Maybe someone can add a check in the second gif encoder (rgb24), because I'm not sure where it should be added.
Unified · Split
| @@ -145,6 +145,11 @@ static av_cold int gif_encode_init(AVCodecContext *avctx) · 144 unmodified lines | |||
| 145 | { | 145 | { |
| 146 | GIFContext *s = avctx->priv_data; | 146 | GIFContext *s = avctx->priv_data; |
| 147 | 147 | ||
| 148 | if (avctx->width > 65535 || avctx->height > 65535) { | ||
| 149 | av_log(avctx, AV_LOG_ERROR, "GIF does not support resolutions above 65535x65535\n"); | ||
| 150 | return -1; | ||
| 151 | } | ||
| 152 | |||
| 148 | avctx->coded_frame = &s->picture; | 153 | avctx->coded_frame = &s->picture; |
| 149 | s->lzw = av_mallocz(ff_lzw_encode_state_size); | 154 | s->lzw = av_mallocz(ff_lzw_encode_state_size); |
| 150 | if (!s->lzw) | 155 | if (!s->lzw) |