Mercurial > mplayer.hg
changeset 24893:bc6132465897
audio: simplify buffer allocation code
Remove the code allocating sh_audio->a_out_buffer from
init_audio_filters() and let the buffer be allocated by the new
dynamic allocation code.
author | uau |
---|---|
date | Thu, 01 Nov 2007 06:52:23 +0000 |
parents | 80180dc13565 |
children | 2bfc75674b71 |
files | libmpcodecs/dec_audio.c |
diffstat | 1 files changed, 1 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/dec_audio.c Thu Nov 01 06:52:19 2007 +0000 +++ b/libmpcodecs/dec_audio.c Thu Nov 01 06:52:23 2007 +0000 @@ -363,19 +363,8 @@ *out_channels = afs->output.nch; *out_format = afs->output.format; - if (out_maxsize || out_minsize) { - // allocate the a_out_* buffers: - if (out_maxsize < out_minsize) - out_maxsize = out_minsize; - if (out_maxsize < 8192) - out_maxsize = MAX_OUTBURST; // not sure this is ok + sh_audio->a_out_buffer_len = 0; - sh_audio->a_out_buffer_size = out_maxsize; - free(sh_audio->a_out_buffer); - sh_audio->a_out_buffer = memalign(16, sh_audio->a_out_buffer_size); - memset(sh_audio->a_out_buffer, 0, sh_audio->a_out_buffer_size); - sh_audio->a_out_buffer_len = 0; - } // ok! sh_audio->afilter = (void *) afs; return 1;