mirror of
https://github.com/mpv-player/mpv
synced 2025-01-17 12:31:25 +00:00
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:
parent
5c7b9ef0d4
commit
5ad47aba11
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user