summaryrefslogtreecommitdiffstats
path: root/player/audio.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2024-03-01 23:47:09 -0600
committerDudemanguy <random342@airmail.cc>2024-03-03 16:24:17 -0600
commit60abbb424bef6873e7bfcbae0f43c4b972fe4274 (patch)
treeee3a07f74bbc1e1686e6d55f57b6884b36f88ccc /player/audio.c
parentb08822b8ce829856261d826c199e94a7fdab72ab (diff)
downloadmpv-60abbb424bef6873e7bfcbae0f43c4b972fe4274.tar.bz2
mpv-60abbb424bef6873e7bfcbae0f43c4b972fe4274.tar.xz
player/audio: also adjust apts by audio speed in audio_start_ao
Fixes 7051e94e4bacd00e53e88835d28e9d9082de3bb3
Diffstat (limited to 'player/audio.c')
-rw-r--r--player/audio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/player/audio.c b/player/audio.c
index 7a37c0d2f2..05a39cd819 100644
--- a/player/audio.c
+++ b/player/audio.c
@@ -829,7 +829,8 @@ 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);
+ double apts = written_audio_pts(mpctx);
+ apts -= apts != MP_NOPTS_VALUE ? mpctx->audio_speed * ao_get_delay(mpctx->ao) : 0;
if (pts != MP_NOPTS_VALUE && apts != MP_NOPTS_VALUE && pts < apts &&
mpctx->video_status != STATUS_EOF)
{