decoder_sys_t *p_sys;
int i_ret;
- if( p_dec->fmt_in.i_codec != VLC_FOURCC('k','a','t','e') )
+ if( p_dec->fmt_in.i_codec != VLC_CODEC_KATE )
{
return VLC_EGENERIC;
}
DecodeBlock;
/* Allocate the memory needed to store the decoder's structure */
- if( ( p_dec->p_sys = p_sys =
- (decoder_sys_t *)malloc(sizeof(decoder_sys_t)) ) == NULL )
+ if( ( p_dec->p_sys = p_sys = malloc(sizeof(*p_sys)) ) == NULL )
return VLC_ENOMEM;
vlc_mutex_init( &p_sys->lock );
#endif
+ es_format_Init( &p_dec->fmt_out, SPU_ES, 0 );
+
/* add the decoder to the global list */
- decoder_t **list = ( decoder_t** ) realloc( kate_decoder_list, (kate_decoder_list_size+1) * sizeof( decoder_t* ));
+ decoder_t **list = realloc( kate_decoder_list, (kate_decoder_list_size+1) * sizeof( *list ));
if( list )
{
list[ kate_decoder_list_size++ ] = p_dec;
if( i_ret == VLC_SUCCESS )
{
p_dec->p_sys->b_packetizer = true;
- p_dec->fmt_out.i_codec = VLC_FOURCC( 'k', 'a', 't', 'e' );
+ p_dec->fmt_out.i_codec = VLC_CODEC_KATE;
}
return i_ret;
/* create a full frame region - this will also tell Tiger the size of the frame */
fmt = *p_fmt;
- fmt.i_chroma = VLC_FOURCC('R','G','B','A');
+ fmt.i_chroma = VLC_CODEC_RGBA;
fmt.i_width = fmt.i_visible_width;
fmt.i_height = fmt.i_visible_height;
fmt.i_bits_per_pixel = 0;
/* create a separate region for the bitmap */
memset( &fmt, 0, sizeof(video_format_t) );
- fmt.i_chroma = VLC_FOURCC('Y','U','V','P');
+ fmt.i_chroma = VLC_CODEC_YUVP;
fmt.i_aspect = 0;
fmt.i_width = fmt.i_visible_width = ev->bitmap->width;
fmt.i_height = fmt.i_visible_height = ev->bitmap->height;
}
/* text region */
- fmt.i_chroma = VLC_FOURCC('T','E','X','T');
+ fmt.i_chroma = VLC_CODEC_TEXT;
fmt.i_aspect = 0;
fmt.i_width = fmt.i_height = 0;
fmt.i_x_offset = fmt.i_y_offset = 0;