Commit a7c1a3eb authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

audio filters can return NULL, handle it properly

parent 35d52735
......@@ -546,6 +546,8 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
/* Run pre-filters. */
aout_FiltersPlay( p_aout, p_input->pp_filters, p_input->i_nb_filters,
&p_buffer );
if( !p_buffer )
return 0;
/* Actually run the resampler now. */
if ( p_input->i_nb_resamplers > 0 )
......@@ -556,9 +558,11 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
&p_buffer );
}
if( !p_buffer )
return 0;
if( p_buffer->i_nb_samples <= 0 )
{
aout_BufferFree( p_buffer );
block_Release( p_buffer );
return 0;
}
#endif
......@@ -643,6 +647,8 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
#ifndef AOUT_PROCESS_BEFORE_CHEKS
/* Run pre-filters. */
aout_FiltersPlay( p_input->pp_filters, p_input->i_nb_filters, &p_buffer );
if( !p_buffer )
return 0;
#endif
/* Run the resampler if needed.
......@@ -735,9 +741,11 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
&p_buffer );
}
if( !p_buffer )
return 0;
if( p_buffer->i_nb_samples <= 0 )
{
aout_BufferFree( p_buffer );
block_Release( p_buffer );
return 0;
}
#endif
......
......@@ -249,9 +249,11 @@ void aout_OutputPlay( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
aout_FiltersPlay( p_aout->output.pp_filters, p_aout->output.i_nb_filters,
&p_buffer );
if( !p_buffer )
return;
if( p_buffer->i_buffer == 0 )
{
aout_BufferFree( p_buffer );
block_Release( p_buffer );
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment