check the intermediate audio buffer

otherwise, data can get stuck between the demuxer and filter layer
causing a premature end of audio.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17275 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
henry 2005-12-31 07:37:37 +00:00
parent b835437de4
commit e512aef61b
1 changed files with 1 additions and 1 deletions

View File

@ -2599,7 +2599,7 @@ while(sh_audio){
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?