Hi! Attached patch fixes ticket #6874 for me. I don't think it makes much sense to discuss what the specification means with "logical screen size" and "raster screen size" and "physical display": Not only do other decoders accept such files, our decoder already contains the necessary code to crop the image. I believe that it could at least be argued that the specification allows such files.
Please comment, Carl Eugen
From 47f5d312461a0d30cd1e70d819ae1daefbb5eebb Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos <ceffm...@gmail.com> Date: Mon, 27 Nov 2017 02:57:50 +0100 Subject: [PATCH] lavc/gifdec: Do not error out if resolution is bigger than screen dimension. This is what other decoders do. Fixes ticket #6874. --- libavcodec/gifdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c index 2eeed4c..59d866b 100644 --- a/libavcodec/gifdec.c +++ b/libavcodec/gifdec.c @@ -179,11 +179,11 @@ static int gif_read_image(GifState *s, AVFrame *frame) } /* verify that all the image is inside the screen dimensions */ - if (!width || width > s->screen_width || left >= s->screen_width) { + if (!width || left >= s->screen_width) { av_log(s->avctx, AV_LOG_ERROR, "Invalid image width.\n"); return AVERROR_INVALIDDATA; } - if (!height || height > s->screen_height || top >= s->screen_height) { + if (!height || top >= s->screen_height) { av_log(s->avctx, AV_LOG_ERROR, "Invalid image height.\n"); return AVERROR_INVALIDDATA; } -- 1.7.10.4
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel