|
|
|
@@ -618,7 +618,7 @@ static int decode_idat_chunk(AVCodecContext *avctx, PNGDecContext *s, |
|
|
|
} else if ((s->bits_per_pixel == 1 || s->bits_per_pixel == 2 || s->bits_per_pixel == 4 || s->bits_per_pixel == 8) && |
|
|
|
s->color_type == PNG_COLOR_TYPE_PALETTE) { |
|
|
|
avctx->pix_fmt = AV_PIX_FMT_PAL8; |
|
|
|
} else if (s->bit_depth == 1 && s->bits_per_pixel == 1) { |
|
|
|
} else if (s->bit_depth == 1 && s->bits_per_pixel == 1 && avctx->codec_id != AV_CODEC_ID_APNG) { |
|
|
|
avctx->pix_fmt = AV_PIX_FMT_MONOBLACK; |
|
|
|
} else if (s->bit_depth == 8 && |
|
|
|
s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { |
|
|
|
|