Merge commit 'e64f0bf2d2b1347ec9461f0e82852a62e8c6ffbe'

* commit 'e64f0bf2d2b1347ec9461f0e82852a62e8c6ffbe':
  png: support reading gray+alpha at 16 bits

Merged-by: Michael Niedermayer <michaelni@gmx.at>
pull/80/head
Michael Niedermayer 11 years ago
commit 59412e3a07
  1. 3
      libavcodec/pngdec.c

@ -655,6 +655,9 @@ static int decode_frame(AVCodecContext *avctx,
} else if (s->bit_depth == 8 &&
s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
avctx->pix_fmt = AV_PIX_FMT_YA8;
} else if (s->bit_depth == 16 &&
s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
avctx->pix_fmt = AV_PIX_FMT_YA16BE;
} else {
av_log(avctx, AV_LOG_ERROR, "unsupported bit depth %d "
"and color type %d\n",

Loading…
Cancel
Save