}
/* 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;
/* Open a faad context */
return VLC_EGENERIC;
}
- p_dec->p_sys = (decoder_sys_t *)malloc( sizeof( decoder_sys_t ) );
+ p_dec->p_sys = calloc( 1, sizeof( *p_dec->p_sys ) );
if( !p_dec->p_sys )
- {
return VLC_ENOMEM;
- }
- memset( p_dec->p_sys, 0, sizeof( decoder_sys_t ) );
psz_file = var_CreateGetNonEmptyStringCommand( p_dec, "fake-file" );
if( !psz_file )
}
/* 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;
/* Misc init */
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;
return VLC_EGENERIC;
}
- p_dec->p_sys = p_sys = malloc( sizeof( decoder_sys_t ) );
+ p_dec->p_sys = p_sys = calloc( 1, sizeof( *p_sys ) );
if( !p_sys )
return VLC_ENOMEM;
- memset( p_sys, 0, sizeof(decoder_sys_t) );
/* Flavor for SIPR codecs */
p_sys->i_codec_flavor = -1;
}
/* 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;
p_dec->p_sys->b_packetizer = false;
}
/* 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;
/* Misc init */