diff --git a/libavcodec/iff.c b/libavcodec/iff.c index b5f04e7e16..6a4c466b44 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -1847,7 +1847,8 @@ static int decode_frame(AVCodecContext *avctx, buf += s->planesize; } } - memcpy(frame->data[1], s->pal, 256 * 4); + if (avctx->pix_fmt == AV_PIX_FMT_PAL8) + memcpy(frame->data[1], s->pal, 256 * 4); } else if (s->ham) { int i, count = 1 << s->ham;