[vlc-devel] commit: Fixed segfault with spdif mixer. (Laurent Aimar	)
    git version control 
    git at videolan.org
       
    Thu Sep  3 22:40:17 CEST 2009
    
    
  
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Sep  3 22:37:16 2009 +0200| [790f188af5f0855128521eaba799a38881be2404] | committer: Laurent Aimar 
Fixed segfault with spdif mixer.
 The aout core use a hack to avoid useless memcpy: the buffer in which
to mix is the same as the one in the first active input fifo.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=790f188af5f0855128521eaba799a38881be2404
---
 modules/audio_mixer/spdif.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules/audio_mixer/spdif.c b/modules/audio_mixer/spdif.c
index 0af800f..f06fad2 100644
--- a/modules/audio_mixer/spdif.c
+++ b/modules/audio_mixer/spdif.c
@@ -29,6 +29,8 @@
 # include "config.h"
 #endif
 
+#include <assert.h>
+
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_aout.h>
@@ -84,7 +86,7 @@ static void DoWork( aout_mixer_t * p_mixer, aout_buffer_t * p_buffer )
         p_input = p_mixer->input[++i];
 
     aout_buffer_t * p_old_buffer = aout_FifoPop( NULL, &p_input->fifo );
-    aout_BufferFree( p_old_buffer );
+    assert( p_old_buffer == p_buffer );
 
     /* Empty other FIFOs to avoid a memory leak. */
     for ( i++; i < p_mixer->input_count; i++ )
    
    
More information about the vlc-devel
mailing list