From 71e445fca3ccc1285068386bf9858d180b0fecfc Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 7 Feb 2007 01:48:09 +0000 Subject: Replace deprecated PIX_FMT names by the newer variants. Originally committed as revision 7867 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/png.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libavcodec/png.c') diff --git a/libavcodec/png.c b/libavcodec/png.c index c7a2bd6e33..c796c34321 100644 --- a/libavcodec/png.c +++ b/libavcodec/png.c @@ -562,7 +562,7 @@ static int decode_frame(AVCodecContext *avctx, avctx->pix_fmt = PIX_FMT_RGB24; } else if (s->bit_depth == 8 && s->color_type == PNG_COLOR_TYPE_RGB_ALPHA) { - avctx->pix_fmt = PIX_FMT_RGBA32; + avctx->pix_fmt = PIX_FMT_RGB32; } else if (s->bit_depth == 8 && s->color_type == PNG_COLOR_TYPE_GRAY) { avctx->pix_fmt = PIX_FMT_GRAY8; @@ -782,7 +782,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, is_progressive = !!(avctx->flags & CODEC_FLAG_INTERLACED_DCT); switch(avctx->pix_fmt) { - case PIX_FMT_RGBA32: + case PIX_FMT_RGB32: bit_depth = 8; color_type = PNG_COLOR_TYPE_RGB_ALPHA; break; @@ -961,6 +961,6 @@ AVCodec png_encoder = { common_init, encode_frame, NULL, //encode_end, - .pix_fmts= (enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGBA32, PIX_FMT_PAL8, PIX_FMT_GRAY8, PIX_FMT_MONOBLACK, -1}, + .pix_fmts= (enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB32, PIX_FMT_PAL8, PIX_FMT_GRAY8, PIX_FMT_MONOBLACK, -1}, }; #endif // CONFIG_PNG_ENCODER -- cgit v1.2.3