Skip to content

Commit

Permalink
player/audio: remove misleading comment about delay
Browse files Browse the repository at this point in the history
This came up in mpv-player#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.
b74c09e, a very controversial commit to
say the least, was what introduced this comment, so removing is probably
OK.
  • Loading branch information
Dudemanguy committed Feb 26, 2024
1 parent e3af545 commit 4375a26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion player/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 4375a26

Please sign in to comment.