diff --git a/libavcodec/gif.c b/libavcodec/gif.c index 52c1d44517..7a5e287c57 100644 --- a/libavcodec/gif.c +++ b/libavcodec/gif.c @@ -163,7 +163,7 @@ static int gif_image_write_image(AVCodecContext *avctx, if (!pal_exdata) return AVERROR(ENOMEM); memcpy(pal_exdata, s->palette, AVPALETTE_SIZE); - pal_exdata[trans*4 + 3] = 0x00; + pal_exdata[trans*4 + 3*!HAVE_BIGENDIAN] = 0x00; } }