[vlc-devel] commit: Fix unitialized value. ( Rémi Duraffort )

git version control git at videolan.org
Fri Aug 15 00:10:35 CEST 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Aug 15 00:00:04 2008 +0200| [e4e08275d001539723a3627586e4aa6de87b88ba] | committer: Rémi Duraffort 

Fix unitialized value.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e4e08275d001539723a3627586e4aa6de87b88ba
---

 modules/audio_filter/resampler/bandlimited.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/audio_filter/resampler/bandlimited.c b/modules/audio_filter/resampler/bandlimited.c
index ad9f089..24c65cf 100644
--- a/modules/audio_filter/resampler/bandlimited.c
+++ b/modules/audio_filter/resampler/bandlimited.c
@@ -135,9 +135,9 @@ static int Create( vlc_object_t *p_this )
 
     /* Allocate the memory needed to store the module's structure */
     p_sys = malloc( sizeof(filter_sys_t) );
-    p_filter->p_sys = (struct aout_filter_sys_t *)p_sys;
     if( p_sys == NULL )
         return VLC_ENOMEM;
+    p_filter->p_sys = (struct aout_filter_sys_t *)p_sys;
 
     /* Calculate worst case for the length of the filter wing */
     d_factor = (double)p_filter->output.i_rate
@@ -156,6 +156,7 @@ static int Create( vlc_object_t *p_this )
     }
 
     p_sys->i_old_wing = 0;
+    p_sys->b_filter2 = false;           /* It seams to be a good valuefor this module */
     p_filter->pf_do_work = DoWork;
 
     /* We don't want a new buffer to be created because we're not sure we'll




More information about the vlc-devel mailing list