mirror of
https://github.com/mpv-player/mpv
synced 2025-03-07 22:57:42 +00:00
in decode_audio() memset(0) unused memory in buf before returning
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19164 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
be75a5f7d7
commit
6ca4f9ea81
@ -99,7 +99,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen)
|
||||
l = min(sh->a_in_buffer_size - sh->a_in_buffer_len, start + len);
|
||||
l = demux_read_data(sh->ds,&sh->a_in_buffer[sh->a_in_buffer_len], l);
|
||||
if(! l)
|
||||
return tot;
|
||||
break;
|
||||
sh->a_in_buffer_len += l;
|
||||
continue;
|
||||
}
|
||||
@ -112,6 +112,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen)
|
||||
tot2 += spf * 2 * chans;
|
||||
}
|
||||
|
||||
memset(&buf[tot], 0, tot2-tot);
|
||||
return tot2;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user