diff options
author | Dudemanguy <random342@airmail.cc> | 2024-03-01 23:47:09 -0600 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2024-03-03 16:24:17 -0600 |
commit | 60abbb424bef6873e7bfcbae0f43c4b972fe4274 (patch) | |
tree | ee3a07f74bbc1e1686e6d55f57b6884b36f88ccc | |
parent | b08822b8ce829856261d826c199e94a7fdab72ab (diff) | |
download | mpv-60abbb424bef6873e7bfcbae0f43c4b972fe4274.tar.bz2 mpv-60abbb424bef6873e7bfcbae0f43c4b972fe4274.tar.xz |
player/audio: also adjust apts by audio speed in audio_start_ao
Fixes 7051e94e4bacd00e53e88835d28e9d9082de3bb3
-rw-r--r-- | player/audio.c | 3 |
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) { |