Fixing potential future problem with buffer overrun

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7582 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
anders 2002-10-02 11:00:37 +00:00
parent 5c7b9ef0d4
commit 5ad47aba11
1 changed files with 2 additions and 1 deletions

View File

@ -408,7 +408,8 @@ int af_inputlen(af_stream_t* s, int len)
inline int af_resize_local_buffer(af_instance_t* af, af_data_t* data)
{
// Calculate new length
register int len = af_lencalc(af->mul,data->len);
register int len = af_lencalc(af->mul,data->len/(data->nch*data->bps)) *
data->nch * data->bps;
mp_msg(MSGT_AFILTER,MSGL_V,"Reallocating memory in module %s, old len = %i, new len = %i\n",af->info->name,af->data->len,len);
// If there is a buffer free it
if(af->data->audio)