X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fcodec%2Fcdg.c;h=31ecd0e55fc1dda9ddd51c58dd0224a24251bb4d;hb=ca35eb93bfb11e12133e473c473bd7a78f4b58d2;hp=c1a3e754a014daecd5def969713962d1d3070999;hpb=c0aeb6ae728d002311a7aa0b9f4b1cb761907705;p=vlc diff --git a/modules/codec/cdg.c b/modules/codec/cdg.c index c1a3e754a0..31ecd0e55f 100644 --- a/modules/codec/cdg.c +++ b/modules/codec/cdg.c @@ -31,7 +31,6 @@ #include #include #include -#include /***************************************************************************** * decoder_sys_t : decoder descriptor @@ -99,7 +98,7 @@ static int Open( 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('C','D','G',' ') ) + if( p_dec->fmt_in.i_codec != VLC_CODEC_CDG ) return VLC_EGENERIC; /* Allocate the memory needed to store the decoder's structure */ @@ -114,11 +113,11 @@ static int Open( vlc_object_t *p_this ) /* Set output properties * TODO maybe it would be better to use RV16 or RV24 ? */ p_dec->fmt_out.i_cat = VIDEO_ES; - p_dec->fmt_out.i_codec = VLC_FOURCC('R','V','3','2'); + p_dec->fmt_out.i_codec = VLC_CODEC_RGB32; p_dec->fmt_out.video.i_width = CDG_DISPLAY_WIDTH; p_dec->fmt_out.video.i_height = CDG_DISPLAY_HEIGHT; - p_dec->fmt_out.video.i_aspect = - VOUT_ASPECT_FACTOR * p_dec->fmt_out.video.i_width / p_dec->fmt_out.video.i_height; + p_dec->fmt_out.video.i_sar_num = 1; + p_dec->fmt_out.video.i_sar_den = 1; p_dec->fmt_out.video.i_rmask = 0xff << CDG_COLOR_R_SHIFT; p_dec->fmt_out.video.i_gmask = 0xff << CDG_COLOR_G_SHIFT; p_dec->fmt_out.video.i_bmask = 0xff << CDG_COLOR_B_SHIFT; @@ -167,7 +166,7 @@ static picture_t *Decode( decoder_t *p_dec, block_t **pp_block ) goto exit; Render( p_sys, p_pic ); - p_pic->date = p_block->i_pts > 0 ? p_block->i_pts : p_block->i_dts; + p_pic->date = p_block->i_pts > VLC_TS_INVALID ? p_block->i_pts : p_block->i_dts; } exit: