[MPlayer-dev-eng] Re: [PATCH] Fix cut off last few seconds of a file

Joey Parrish joey at nicewarrior.org
Tue Aug 24 00:27:47 CEST 2004


On Mon, Aug 23, 2004 at 12:00:49PM -0300, Julián Nuñez wrote:
> Mikulas Patocka <mikulas at artax.karlin.mff.cuni.cz> wrote:
> >When the stream has only audio data, the position is incorrectly displayed
> >(not taking into account audio buffer). This is visible especially on
> >soundcard drivers with large buffer. The bug is caused by a typo ---
> >10 * sh_audio->delay is in tenths of seconds, however
> >audio_out->get_delay() returns seconds, so it doesn't make sense to
> >subtract them. This patch fixes it (it also fixes wrong display with
> >different -speed)

> Sorry for my ignorance, but did this two parches got applied? They work 
> great for me.

> >--- ../mplayer-1.0pre4-bak/mplayer.c	2004-05-20 13:22:48.000000000 +0100
> >+++ mplayer.c	2004-08-01 18:38:21.000000000 +0100
> >@@ -2013,7 +2013,7 @@
> >      //
> >      // convert time to HH:MM:SS.F format
> >      //
> >-      long tenths = 10 * sh_audio->delay-audio_out->get_delay();
> >+      long tenths = 10 * 
> >(sh_audio->delay-audio_out->get_delay()*playback_speed);
> >      int hh = (tenths / 36000) % 100;
> >      int mm = (tenths / 600) % 60;
> >      int ss = (tenths /  10) % 60;

This one has been applied already.

> >--- MPLAYER.C~	2004-08-01 22:24:36.000000000 +0100
> >+++ mplayer.c	2004-08-02 04:36:24.000000000 +0100
> >@@ -2044,7 +2044,7 @@
> >		    ,cache_fill_status
> >		    );
> >  }
> >-  if(d_audio->eof) eof = PT_NEXT_ENTRY;
> >+  if(d_audio->eof && !audio_out->get_delay()) eof = PT_NEXT_ENTRY;
> >
> >} else {

This part has not.
Is this okay to apply?

--Joey

-- 
Me: "Isn't Kennedy as real as Colonel Sanders?"
Chad: "... Which Kennedy?"




More information about the MPlayer-dev-eng mailing list