ffmpeg | branch: master | Paul B Mahol <one...@gmail.com> | Sun Aug 23 15:05:24 
2020 +0200| [568b7b2777231cc0be823f270a916f951dcbf0a8] | committer: Paul B Mahol

avcodec/gif: fix disposal method for first frame and transparent gifs

Fixes #7902

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=568b7b2777231cc0be823f270a916f951dcbf0a8
---

 libavcodec/gif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to