X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fgif.c;h=cf5d438a7283ac45b048a273d8fe5a0a87a1315c;hb=99bcfe62278ffc11e2665e653dcb90336ec8d7ff;hp=db2cee9412eef4f101674e03f679012b38fdda0c;hpb=6c44dd6c6ee60aaa706cb4b58db79a8857cda648;p=ffmpeg diff --git a/libavcodec/gif.c b/libavcodec/gif.c index db2cee9412e..cf5d438a728 100644 --- a/libavcodec/gif.c +++ b/libavcodec/gif.c @@ -108,7 +108,7 @@ static int gif_image_write_image(AVCodecContext *avctx, /* skip common columns */ while (x_start < x_end) { int same_column = 1; - for (y = y_start; y < y_end; y++) { + for (y = y_start; y <= y_end; y++) { if (ref[y*ref_linesize + x_start] != buf[y*linesize + x_start]) { same_column = 0; break; @@ -120,7 +120,7 @@ static int gif_image_write_image(AVCodecContext *avctx, } while (x_end > x_start) { int same_column = 1; - for (y = y_start; y < y_end; y++) { + for (y = y_start; y <= y_end; y++) { if (ref[y*ref_linesize + x_end] != buf[y*linesize + x_end]) { same_column = 0; break;