[vlc-devel] commit: Remove aout_buffer_t.b_alloc (it's always true) ( Rémi Denis-Courmont )
git version control
git at videolan.org
Tue Sep 22 23:01:58 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Sep 22 23:55:20 2009 +0300| [04685d70e24c425cf200145e6cf3fbef919ca2ed] | committer: Rémi Denis-Courmont
Remove aout_buffer_t.b_alloc (it's always true)
When allocation is false, aout_BufferFree is simply not called.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=04685d70e24c425cf200145e6cf3fbef919ca2ed
---
include/vlc_aout.h | 4 +---
src/audio_output/common.c | 1 -
2 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/include/vlc_aout.h b/include/vlc_aout.h
index 6fd0f24..6fc235b 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 bd9556c..58fa155 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;
More information about the vlc-devel
mailing list