[MPlayer-dev-eng] [patch] fix premature end of audio playback

Jindrich Makovicka makovick at kmlinux.fjfi.cvut.cz
Fri Dec 30 21:09:00 CET 2005


Jindrich Makovicka wrote:
> Hi,
> 
> this patch fixes $subj when playing through audio filters.
> 
> The bug can be observed on http://voffka.com/archives/zp.avi
> 
> Regards,
> 
> 
> ------------------------------------------------------------------------
> 
> Index: mplayer.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/mplayer.c,v
> retrieving revision 1.898
> diff -u -r1.898 mplayer.c
> --- mplayer.c	29 Dec 2005 11:27:22 -0000	1.898
> +++ mplayer.c	29 Dec 2005 17:09:53 -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?

No complaints? Is it ok to commit?

-- 
Jindrich Makovicka




More information about the MPlayer-dev-eng mailing list