Mercurial > mplayer.hg
changeset 11857:6107e58dcc28
not pretty, but at least it prevents the channels from getting out of order...
the real solution is to get rid of libaf (probably the worst code in mplayer!)
and replace it with a good audio layer...
author | rfelker |
---|---|
date | Tue, 27 Jan 2004 06:30:16 +0000 |
parents | 25deff3ac942 |
children | 456c9ab6c211 |
files | libmpcodecs/dec_audio.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/dec_audio.c Tue Jan 27 06:02:29 2004 +0000 +++ b/libmpcodecs/dec_audio.c Tue Jan 27 06:30:16 2004 +0000 @@ -438,8 +438,10 @@ declen, pafd->len, maxlen); // copy filter==>out: - if(maxlen < pafd->len) + if(maxlen < pafd->len) { + maxlen -= maxlen % (sh_audio->channels * sh_audio->samplesize); mp_msg(MSGT_DECAUDIO,MSGL_WARN,"%i bytes of audio data lost due to buffer overflow, len = %i\n", pafd->len - maxlen,pafd->len); + } else maxlen=pafd->len; memmove(buf, pafd->audio, maxlen);