[vlc-devel] commit: visual: factorize. ( Rémi Duraffort )
git version control
git at videolan.org
Fri Nov 20 10:11:03 CET 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Nov 20 10:10:14 2009 +0100| [b5cc8bd2de210d0334dc5a7d71a816ae918e8294] | committer: Rémi Duraffort
visual: factorize.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b5cc8bd2de210d0334dc5a7d71a816ae918e8294
---
modules/visualization/visual/visual.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/modules/visualization/visual/visual.c b/modules/visualization/visual/visual.c
index ee69dee..c34d9d1 100644
--- a/modules/visualization/visual/visual.c
+++ b/modules/visualization/visual/visual.c
@@ -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 );
More information about the vlc-devel
mailing list