summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/iff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/iff.c b/libavcodec/iff.c
index 00f5261662..ce06b365fc 100644
--- a/libavcodec/iff.c
+++ b/libavcodec/iff.c
@@ -849,9 +849,9 @@ static int decode_frame(AVCodecContext *avctx,
break;
case 4:
bytestream2_init(&gb, buf, buf_size);
- if (avctx->codec_tag == MKTAG('R', 'G', 'B', '8'))
+ if (avctx->codec_tag == MKTAG('R', 'G', 'B', '8') && avctx->pix_fmt == AV_PIX_FMT_RGB32)
decode_rgb8(&gb, s->frame->data[0], avctx->width, avctx->height, s->frame->linesize[0]);
- else if (avctx->codec_tag == MKTAG('R', 'G', 'B', 'N'))
+ else if (avctx->codec_tag == MKTAG('R', 'G', 'B', 'N') && avctx->pix_fmt == AV_PIX_FMT_RGB444)
decode_rgbn(&gb, s->frame->data[0], avctx->width, avctx->height, s->frame->linesize[0]);
else
return unsupported(avctx);