Mercurial > mplayer.hg
changeset 17274:13b99f89969f
check the intermediate audio buffer
otherwise, data can get stuck between the demuxer and filter layer
causing a premature end of audio.
author | henry |
---|---|
date | Sat, 31 Dec 2005 07:37:37 +0000 |
parents | 30f4c40e137f |
children | 4c590d768a07 |
files | mplayer.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mplayer.c Sat Dec 31 00:41:35 2005 +0000 +++ b/mplayer.c Sat Dec 31 07:37:37 2005 +0000 @@ -2599,7 +2599,7 @@ current_module="decode_audio"; // Enter AUDIO decoder module t=GetTimer(); while(sh_audio->a_out_buffer_len<playsize && - (!d_audio->eof || sh_audio->a_in_buffer_len > 0)){ + (!d_audio->eof || sh_audio->a_in_buffer_len > 0 || sh_audio->a_buffer_len > 0)){ int ret=decode_audio(sh_audio,&sh_audio->a_out_buffer[sh_audio->a_out_buffer_len], playsize-sh_audio->a_out_buffer_len,sh_audio->a_out_buffer_size-sh_audio->a_out_buffer_len); if(ret<=0) { // EOF?