summaryrefslogtreecommitdiff
path: root/libavcodec/iff.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/iff.c')
-rw-r--r--libavcodec/iff.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/iff.c b/libavcodec/iff.c
index 019af4dbfe..2c783ee5ce 100644
--- a/libavcodec/iff.c
+++ b/libavcodec/iff.c
@@ -218,6 +218,7 @@ static int decode_frame_ilbm(AVCodecContext *avctx,
return -1;
}
+ if (avctx->codec_tag == MKTAG('I','L','B','M')) { // interleaved
if (avctx->pix_fmt == PIX_FMT_PAL8) {
for(y = 0; y < avctx->height; y++ ) {
uint8_t *row = &s->frame.data[0][ y*s->frame.linesize[0] ];
@@ -237,6 +238,13 @@ static int decode_frame_ilbm(AVCodecContext *avctx,
}
}
}
+ } else if (avctx->pix_fmt == PIX_FMT_PAL8) { // IFF-PBM
+ for(y = 0; y < avctx->height; y++ ) {
+ uint8_t *row = &s->frame.data[0][y * s->frame.linesize[0]];
+ memcpy(row, buf, FFMIN(avctx->width, buf_end - buf));
+ buf += avctx->width;
+ }
+ }
*data_size = sizeof(AVFrame);
*(AVFrame*)data = s->frame;