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 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;