Commit b5cc8bd2 authored by Rémi Duraffort's avatar Rémi Duraffort

visual: factorize.

parent 60b30f42
......@@ -395,14 +395,16 @@ static void Close( vlc_object_t *p_this )
#define p_effect p_sys->effect[i]
if( !strncmp( p_effect->psz_name, "spectrum", strlen( "spectrum" ) ) )
{
free( ( ( spectrum_data * )p_effect->p_data )->peaks );
free( ( ( spectrum_data * )p_effect->p_data )->prev_heights );
free( ( ( spectrum_data * )p_effect->p_data )->p_prev_s16_buff );
spectrum_data *p_data = p_effect->p_data;
free( p_data->peaks );
free( p_data->prev_heights );
free( p_data->p_prev_s16_buff );
}
if( !strncmp( p_effect->psz_name, "spectrometer", strlen( "spectrometer" ) ) )
{
free( ((spectrometer_data*)p_effect->p_data)->peaks );
free( ((spectrometer_data*)p_effect->p_data)->p_prev_s16_buff );
spectrometer_data *p_data = p_effect->p_data;
free( p_data->peaks );
free( p_data->p_prev_s16_buff );
}
free( p_effect->p_data );
free( p_effect->psz_args );
......
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