-/*****************************************************************************
- * Create:
- *****************************************************************************/
-static int Create( vlc_object_t *p_this )
-{
- aout_filter_t *p_filter = (aout_filter_t *)p_this;
- struct filter_sys_t *p_sys;
-
- if ( (p_filter->input.i_format != VLC_CODEC_MPGA
- && p_filter->input.i_format != VLC_FOURCC('m','p','g','3'))
- || (p_filter->output.i_format != VLC_CODEC_FL32
- && p_filter->output.i_format != VLC_CODEC_FI32) )
- {
- return -1;
- }
-
- if ( !AOUT_FMTS_SIMILAR( &p_filter->input, &p_filter->output ) )
- {
- return -1;
- }
-
- /* Allocate the memory needed to store the module's structure */
- p_sys = malloc( sizeof(filter_sys_t) );
- p_filter->p_sys = (struct aout_filter_sys_t *)p_sys;
- if( p_sys == NULL )
- return -1;
-
- /* Initialize libmad */
- mad_stream_init( &p_sys->mad_stream );
- mad_frame_init( &p_sys->mad_frame );
- mad_synth_init( &p_sys->mad_synth );
- mad_stream_options( &p_sys->mad_stream, MAD_OPTION_IGNORECRC );
- p_sys->i_reject_count = 0;
-
- p_filter->pf_do_work = DoWork;
- p_filter->b_in_place = 0;
-
- return 0;
-}
-