[FFmpeg-cvslog] gifenc: support resolutions up to 65535x65535

Piotr Bandurski git at videolan.org
Thu Jun 7 01:44:17 CEST 2012


ffmpeg | branch: release/0.11 | Piotr Bandurski <ami_stuff at o2.pl> | Thu May 31 15:17:59 2012 +0200| [91ac6d9902b0550e82c6dc4081b12eb7ba145b68] | committer: Michael Niedermayer

gifenc: support resolutions up to 65535x65535

Maybe someone can add a check in the second gif encoder (rgb24), because I'm not sure where it should be added.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit e03ddbcd919b11a289c2de8a47c83efe7fab32fb)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=91ac6d9902b0550e82c6dc4081b12eb7ba145b68
---

 libavcodec/gif.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/gif.c b/libavcodec/gif.c
index ec4be27..5cb635d 100644
--- a/libavcodec/gif.c
+++ b/libavcodec/gif.c
@@ -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)



More information about the ffmpeg-cvslog mailing list