X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fcodec%2Fpng.c;h=3d8a6ff9fd075a5cf02ccff1196f7bc0c00b484d;hb=7cec1ea277ecd0112adee88f9154c17e5205e3c2;hp=c604f014a1ad3be5274d34d27f3296cac213d286;hpb=7a7ed7071ed0936ce7c817c6aae951c1d31d1c87;p=vlc diff --git a/modules/codec/png.c b/modules/codec/png.c index c604f014a1..3d8a6ff9fd 100644 --- a/modules/codec/png.c +++ b/modules/codec/png.c @@ -31,7 +31,6 @@ #include #include #include -#include #include /***************************************************************************** @@ -70,7 +69,7 @@ static int OpenDecoder( vlc_object_t *p_this ) decoder_t *p_dec = (decoder_t*)p_this; decoder_sys_t *p_sys; - if( p_dec->fmt_in.i_codec != VLC_FOURCC('p','n','g',' ') && + if( p_dec->fmt_in.i_codec != VLC_CODEC_PNG && p_dec->fmt_in.i_codec != VLC_FOURCC('M','P','N','G') ) { return VLC_EGENERIC; @@ -83,7 +82,7 @@ static int OpenDecoder( vlc_object_t *p_this ) /* Set output properties */ p_dec->fmt_out.i_cat = VIDEO_ES; - p_dec->fmt_out.i_codec = VLC_FOURCC('R','G','B','A'); + p_dec->fmt_out.i_codec = VLC_CODEC_RGBA; /* Set callbacks */ p_dec->pf_decode_video = DecodeBlock; @@ -184,7 +183,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) if( p_sys->b_error ) goto error; /* Set output properties */ - p_dec->fmt_out.i_codec = VLC_FOURCC('R','G','B','A'); + p_dec->fmt_out.i_codec = VLC_CODEC_RGBA; p_dec->fmt_out.video.i_width = i_width; p_dec->fmt_out.video.i_height = i_height; p_dec->fmt_out.video.i_aspect = VOUT_ASPECT_FACTOR * i_width / i_height; @@ -208,7 +207,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) } else if( !(i_color_type & PNG_COLOR_MASK_ALPHA) ) { - p_dec->fmt_out.i_codec = VLC_FOURCC('R','V','2','4'); + p_dec->fmt_out.i_codec = VLC_CODEC_RGB24; } /* Get a new picture */