Commit 95b20ad7 authored by Paul B Mahol's avatar Paul B Mahol

avcodec/iff: fix artifacts with uncompressed ham ANIMs

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent af3e944e
...@@ -1366,9 +1366,9 @@ static int decode_frame(AVCodecContext *avctx, ...@@ -1366,9 +1366,9 @@ static int decode_frame(AVCodecContext *avctx,
} }
} else if (avctx->codec_tag == MKTAG('I', 'L', 'B', 'M') || // interleaved } else if (avctx->codec_tag == MKTAG('I', 'L', 'B', 'M') || // interleaved
avctx->codec_tag == MKTAG('A', 'N', 'I', 'M')) { avctx->codec_tag == MKTAG('A', 'N', 'I', 'M')) {
if (avctx->codec_tag == MKTAG('A', 'N', 'I', 'M'))
memcpy(s->video[0], buf, FFMIN(buf_end - buf, s->video_size));
if (avctx->pix_fmt == AV_PIX_FMT_PAL8 || avctx->pix_fmt == AV_PIX_FMT_GRAY8) { if (avctx->pix_fmt == AV_PIX_FMT_PAL8 || avctx->pix_fmt == AV_PIX_FMT_GRAY8) {
if (avctx->codec_tag == MKTAG('A', 'N', 'I', 'M'))
memcpy(s->video[0], buf, FFMIN(buf_end - buf, s->video_size));
for (y = 0; y < avctx->height; y++) { for (y = 0; y < avctx->height; y++) {
uint8_t *row = &frame->data[0][y * frame->linesize[0]]; uint8_t *row = &frame->data[0][y * frame->linesize[0]];
memset(row, 0, avctx->width); memset(row, 0, avctx->width);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment