From 122dcdcb31d86722916ca04099715e80a6f6bd1b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 10 Mar 2010 22:43:23 +0000 Subject: [PATCH] Fix some apparent +- errors in the audio vissualization. The bugs become only vissible at higher time resolution than what is used currently. Originally committed as revision 22442 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffplay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ffplay.c b/ffplay.c index b42a2a20e..82c07d434 100644 --- a/ffplay.c +++ b/ffplay.c @@ -828,10 +828,10 @@ static void video_audio_display(VideoState *s) the last buffer computation */ if (audio_callback_time) { time_diff = av_gettime() - audio_callback_time; - delay += (time_diff * s->audio_st->codec->sample_rate) / 1000000; + delay -= (time_diff * s->audio_st->codec->sample_rate) / 1000000; } - delay -= data_used / 2; + delay += 2*data_used; if (delay < data_used) delay = data_used; -- 2.11.0