diff --git a/libavcodec/iff.c b/libavcodec/iff.c index bf42fada33..ea25048f29 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -1845,7 +1845,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;