[MPlayer-dev-eng] [PATCH] Correct displaying of position in audio-only streams

Attila Kinali attila at kinali.ch
Sun Aug 8 06:10:14 CEST 2004


On Mon, Aug 02, 2004 at 05:08:41PM +0200, Mikulas Patocka 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)
> 
> Mikulas
Content-Description: fix wrong displaying of position in audio-only streams
> --- ../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);

Looks, ok, can be applied, but spaces should be added between the
operators (this is definitly code obfuscation)

			Attila Kinali




More information about the MPlayer-dev-eng mailing list