aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-08-23 15:05:24 +0200
committerPaul B Mahol <onemda@gmail.com>2020-08-23 16:21:56 +0200
commit568b7b2777231cc0be823f270a916f951dcbf0a8 (patch)
tree936228f6ba739317d2e924f90166953caf904ae6
parent1c3a3a4ec66f66306013d5038b13dabffcf9f5d9 (diff)
downloadffmpeg-568b7b2777231cc0be823f270a916f951dcbf0a8.tar.gz
avcodec/gif: fix disposal method for first frame and transparent gifs
Fixes #7902
-rw-r--r--libavcodec/gif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/gif.c b/libavcodec/gif.c
index e92dfa65d7..65a76cfde4 100644
--- a/libavcodec/gif.c
+++ b/libavcodec/gif.c
@@ -267,7 +267,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;