Mercurial > mplayer.hg
changeset 19159:7945609397b0
in decode_audio() memset(0) unused memory in buf before returning
author | nicodvb |
---|---|
date | Sun, 23 Jul 2006 08:35:18 +0000 |
parents | 6373c98ada45 |
children | ccb42ce33c23 |
files | libmpcodecs/ad_hwmpa.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/ad_hwmpa.c Sun Jul 23 07:52:51 2006 +0000 +++ b/libmpcodecs/ad_hwmpa.c Sun Jul 23 08:35:18 2006 +0000 @@ -99,7 +99,7 @@ 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 @@ tot2 += spf * 2 * chans; } + memset(&buf[tot], 0, tot2-tot); return tot2; }