From 9f697edfa5a7e5b68585f051114e6e112305a4dc Mon Sep 17 00:00:00 2001 From: Jacob Graff Date: Fri, 10 May 2019 16:27:02 -0400 Subject: [PATCH] Fix disposal method issue --- libavcodec/gif.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/gif.c b/libavcodec/gif.c index d7768b44262e4..6bf656a589a55 100644 --- a/libavcodec/gif.c +++ b/libavcodec/gif.c @@ -191,6 +191,7 @@ static void gif_crop_translucent(AVCodecContext *avctx, *height = y_end + 1 - *y_start; *width = x_end + 1 - *x_start; + av_log(avctx, AV_LOG_DEBUG,"%dx%d image at pos (%d;%d) [area:%dx%d]\n", *width, *height, *x_start, *y_start, avctx->width, avctx->height); } @@ -267,7 +268,7 @@ static int gif_image_write_image(AVCodecContext *avctx, int bcid = -1, honor_transparency = (s->flags & GF_TRANSDIFF) && s->last_frame && !palette; const uint8_t *ptr; - if (!s->image && avctx->frame_number && is_image_translucent(avctx, buf, linesize)) { + if (!s->image && is_image_translucent(avctx, buf, linesize)) { gif_crop_translucent(avctx, buf, linesize, &width, &height, &x_start, &y_start); honor_transparency = 0; disposal = GCE_DISPOSAL_BACKGROUND;