+ aout_filter_t * p_filter;
+
+ if( p_input->i_nb_filters >= AOUT_MAX_FILTERS )
+ {
+ msg_Dbg( p_aout, "max filter reached (%d)", AOUT_MAX_FILTERS );
+ break;
+ }
+
+ while( *psz_parser == ' ' && *psz_parser == ',' )
+ {
+ psz_parser++;
+ }
+ if( ( psz_next = strchr( psz_parser , ',' ) ) )
+ {
+ *psz_next++ = '\0';
+ }
+ if( *psz_parser =='\0' )
+ {
+ break;
+ }
+
+ msg_Dbg( p_aout, "user filter %s", psz_parser );
+
+ /* Create a VLC object */
+ p_filter = vlc_object_create( p_aout, sizeof(aout_filter_t) );
+ if( p_filter == NULL )
+ {
+ msg_Err( p_aout, "cannot add user filter %s (skipped)",
+ psz_parser );
+ psz_parser = psz_next;
+ continue;
+ }
+
+ vlc_object_attach( p_filter , p_aout );
+ memcpy( &p_filter->input, &format_in,
+ sizeof(audio_sample_format_t) );
+ memcpy( &p_filter->output, &format_out,
+ sizeof(audio_sample_format_t) );
+
+ p_filter->p_module =
+ module_Need( p_filter,"audio filter", psz_parser );
+
+ if( p_filter->p_module== NULL )
+ {
+ msg_Err( p_aout, "cannot add user filter %s (skipped)",
+ psz_parser );
+
+ vlc_object_detach( p_filter );
+ vlc_object_destroy( p_filter );
+ psz_parser = psz_next;
+ continue;
+
+ }
+ p_filter->b_continuity = VLC_FALSE;
+
+ p_input->pp_filters[p_input->i_nb_filters++] = p_filter;
+
+ /* next filter if any */
+ psz_parser = psz_next;