]> git.sesse.net Git - vlc/blobdiff - modules/audio_mixer/spdif.c
spdif: Add a comment to explicitely explain why we don't free old buffer.
[vlc] / modules / audio_mixer / spdif.c
index f06fad2c547cddab25adc6d644e2e93db3985d6e..c21e6e6094c74f95b04f52a0a8c8620cf37a07fe 100644 (file)
@@ -86,6 +86,10 @@ 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 );
+    /* We don't free the old buffer because,
+     * 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.
+     * So the ownership of that buffer belongs to our caller */
     assert( p_old_buffer == p_buffer );
 
     /* Empty other FIFOs to avoid a memory leak. */