From 4375a26e3c7ae289b9f49c3b266ccf829500cd42 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Sun, 25 Feb 2024 22:50:10 -0600 Subject: player/audio: remove misleading comment about delay This came up in #13571. playing_audio_pts does not include mpctx->delay contray to what that implies. The function is meant to only offset the written audio pts by whatever the internal AO buffer may be. mpctx->delay is a combination from both the audio and video code, so it should not be used here. What is wanted is purely the audio pts. b74c09efbf7c6969fc053265f72cc0501b840ce1, a very controversial commit to say the least, was what introduced this comment, so removing is probably OK. --- player/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player') diff --git a/player/audio.c b/player/audio.c index 72cb440014..f5379ca59b 100644 --- a/player/audio.c +++ b/player/audio.c @@ -845,7 +845,7 @@ void audio_start_ao(struct MPContext *mpctx) double pts = MP_NOPTS_VALUE; if (!get_sync_pts(mpctx, &pts)) return; - double apts = playing_audio_pts(mpctx); // (basically including mpctx->delay) + double apts = playing_audio_pts(mpctx); if (pts != MP_NOPTS_VALUE && apts != MP_NOPTS_VALUE && pts < apts && mpctx->video_status != STATUS_EOF) { -- cgit v1.2.3