- pp_filters[0] = FindFilter( p_aout, p_input_format, &temp_format );
- if ( pp_filters[0] == NULL && i_nb_conversions == 2 )
- {
- /* Try with only one conversion. */
- SplitConversion( p_input_format, &temp_format, &temp_format );
- pp_filters[0] = FindFilter( p_aout, p_input_format, &temp_format );
- }
- if ( pp_filters[0] == NULL )
- {
- msg_Err( p_aout,
- "couldn't find a filter for the first part of the conversion" );
- return -1;
- }
-
- /* We have the first stage of the conversion. Find a filter for
- * the rest. */
- if( *pi_nb_filters + 2 > AOUT_MAX_FILTERS )
- {
- ReleaseFilter( pp_filters[0] );
- msg_Err( p_aout, "max filter reached (%d)", AOUT_MAX_FILTERS );
- intf_UserFatal( p_aout, false, _("Audio filtering failed"),
- _("The maximum number of filters (%d) was reached."),
- AOUT_MAX_FILTERS );
- return -1;
- }
- pp_filters[1] = FindFilter( p_aout, &pp_filters[0]->output,
- p_output_format );
- if ( pp_filters[1] == NULL )
- {
- /* Try to split the conversion. */
- i_nb_conversions = SplitConversion( &pp_filters[0]->output,
- p_output_format, &temp_format );
- if ( !i_nb_conversions )