diff options
author | uau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-11-07 23:16:55 +0000 |
---|---|---|
committer | uau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-11-07 23:16:55 +0000 |
commit | 0d8f9453b5062956289d8c021103cb3b9ab27dc4 (patch) | |
tree | dc0352b3e0c7622f1c12102a20b2ae08e006f42f /libmpcodecs | |
parent | 2df43c4b2f59e0d402563b4d94f0594e77c0465b (diff) | |
download | mpv-0d8f9453b5062956289d8c021103cb3b9ab27dc4.tar.bz2 mpv-0d8f9453b5062956289d8c021103cb3b9ab27dc4.tar.xz |
Fix code that cuts audio data if the filters produce too much.
It incorrectly used the channel count and sample size values from the
decoder even though the filters can change those.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20768 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/dec_audio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libmpcodecs/dec_audio.c b/libmpcodecs/dec_audio.c index 03f5d532f3..335c01831a 100644 --- a/libmpcodecs/dec_audio.c +++ b/libmpcodecs/dec_audio.c @@ -415,7 +415,8 @@ int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen) // copy filter==>out: if(maxlen < pafd->len) { - maxlen -= maxlen % (sh_audio->channels * sh_audio->samplesize); + af_stream_t *afs = sh_audio->afilter; + maxlen -= maxlen % (afs->output.nch * afs->output.bps); 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 |