Allow decoding of 64bit png images.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Mon, 30 Jan 2012 23:13:24 +0000 (00:13 +0100)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Mon, 30 Jan 2012 23:13:24 +0000 (00:13 +0100)
Fixes a part of ticket #639.

libavcodec/pngdec.c

index 75f882c..41a91f2 100644 (file)
@@ -485,6 +485,9 @@ static int decode_frame(AVCodecContext *avctx,
                 } else if (s->bit_depth == 16 &&
                            s->color_type == PNG_COLOR_TYPE_RGB) {
                     avctx->pix_fmt = PIX_FMT_RGB48BE;
+                } else if (s->bit_depth == 16 &&
+                           s->color_type == PNG_COLOR_TYPE_RGB_ALPHA) {
+                    avctx->pix_fmt = PIX_FMT_RGBA64BE;
                 } else if (s->color_type == PNG_COLOR_TYPE_PALETTE) {
                     avctx->pix_fmt = PIX_FMT_PAL8;
                 } else if (s->bit_depth == 1) {