From: RĂ©mi Denis-Courmont Date: Tue, 22 Sep 2009 20:55:20 +0000 (+0300) Subject: Remove aout_buffer_t.b_alloc (it's always true) X-Git-Tag: 1.1.0-ff~3264 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=04685d70e24c425cf200145e6cf3fbef919ca2ed;p=vlc Remove aout_buffer_t.b_alloc (it's always true) When allocation is false, aout_BufferFree is simply not called. --- diff --git a/include/vlc_aout.h b/include/vlc_aout.h index 6fd0f24480..6fc235bf9c 100644 --- a/include/vlc_aout.h +++ b/include/vlc_aout.h @@ -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. */ diff --git a/src/audio_output/common.c b/src/audio_output/common.c index bd9556cb88..58fa15586d 100644 --- a/src/audio_output/common.c +++ b/src/audio_output/common.c @@ -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;