[FFmpeg-cvslog] avcodec/gif: don't honor transparency if palette changed

Paul B Mahol git at videolan.org
Wed Sep 7 17:14:36 EEST 2016


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Sep  6 13:28:59 2016 +0200| [7a258ef97e54a499b1ab8ad0244dbb8c48b4fd51] | committer: Paul B Mahol

avcodec/gif: don't honor transparency if palette changed

It generally does not work.

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

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

diff --git a/libavcodec/gif.c b/libavcodec/gif.c
index 6af1f4a..d9c99d5 100644
--- a/libavcodec/gif.c
+++ b/libavcodec/gif.c
@@ -83,7 +83,7 @@ static int gif_image_write_image(AVCodecContext *avctx,
     GIFContext *s = avctx->priv_data;
     int len = 0, height = avctx->height, width = avctx->width, x, y;
     int x_start = 0, y_start = 0, trans = s->transparent_index;
-    int honor_transparency = (s->flags & GF_TRANSDIFF) && s->last_frame;
+    int honor_transparency = (s->flags & GF_TRANSDIFF) && s->last_frame && !palette;
     const uint8_t *ptr;
 
     /* Crop image */



More information about the ffmpeg-cvslog mailing list