summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/iff.c3
1 files changed, 2 insertions, 1 deletions
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;