Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Bandurski <ami_stuff@o2.pl>2012-05-31 17:17:59 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-06-07 02:55:24 +0400
commit91ac6d9902b0550e82c6dc4081b12eb7ba145b68 (patch)
treeaa6486bfcecdd1a8e119e3c47ec2972938c1b930 /libavcodec
parent0a311df6d96e5155bbfb1824be50f2e2b3f7a30e (diff)
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@gmx.at> (cherry picked from commit e03ddbcd919b11a289c2de8a47c83efe7fab32fb) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/gif.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/gif.c b/libavcodec/gif.c
index ec4be2749b..5cb635df1f 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)