Commit 8cf7b429 authored by Rémi Duraffort's avatar Rémi Duraffort

visual: factorize.

parent 68dd76f1
......@@ -432,22 +432,14 @@ int spectrometer_Run(visual_effect_t * p_effect, vlc_object_t *p_aout,
if( !p_effect->p_data )
{
p_effect->p_data=(void *)malloc( 80 * sizeof(int) );
p_effect->p_data=(void *)calloc( 80, sizeof(int) );
if( !p_effect->p_data )
{
free( p_s16_buff );
return -1;
}
peaks = (int *)p_effect->p_data;
for( i = 0 ; i < i_nb_bands ; i++ )
{
peaks[i] = 0;
}
}
else
{
peaks =(int *)p_effect->p_data;
}
peaks =(int *)p_effect->p_data;
height = (int *)malloc( i_nb_bands * sizeof(int) );
if( !height)
......
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