]> git.sesse.net Git - vlc/commitdiff
Remove aout_buffer_t.b_alloc (it's always true)
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 22 Sep 2009 20:55:20 +0000 (23:55 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 22 Sep 2009 21:01:55 +0000 (00:01 +0300)
When allocation is false, aout_BufferFree is simply not called.

include/vlc_aout.h
src/audio_output/common.c

index 6fd0f24480794062c32498cf239797c1fa90a72c..6fc235bf9cc8b2b3272452c6873413959b1bd85e 100644 (file)
@@ -133,7 +133,6 @@ struct aout_buffer_t
      * is the number of significative bytes in it. */
     size_t                  i_size, i_nb_bytes;
     unsigned int            i_nb_samples;
-    bool                    b_alloc;
     bool                    b_discontinuity; /* Set on discontinuity (for non pcm stream) */
     mtime_t                 start_date, end_date;
 
@@ -143,8 +142,7 @@ struct aout_buffer_t
 
 static inline void aout_BufferFree( aout_buffer_t *buffer )
 {
-    if( buffer && buffer->b_alloc )
-        free( buffer );
+    free( buffer );
 }
 
 /* Size of a frame for S/PDIF output. */
index bd9556cb88e30306727b48563dc083f08db02171..58fa15586d842726d772b169200076da82154dbb 100644 (file)
@@ -717,7 +717,6 @@ aout_buffer_t *aout_BufferAlloc(aout_alloc_t *allocation, mtime_t microseconds,
     if ( !buffer )
         return NULL;
 
-    buffer->b_alloc = true;
     buffer->i_size = i_alloc_size;
     buffer->p_buffer = (uint8_t *)buffer + sizeof(aout_buffer_t);
     buffer->b_discontinuity = false;