summaryrefslogtreecommitdiffstats
path: root/player/audio.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2024-03-02 09:50:23 -0600
committerDudemanguy <random342@airmail.cc>2024-03-03 16:24:28 -0600
commitd10cebec1317d1fd9006f3bd3bdc6d75e399ebaa (patch)
tree0d00d47147dca8d3ddc37e87383c5fb10b81c5e8 /player/audio.c
parent60abbb424bef6873e7bfcbae0f43c4b972fe4274 (diff)
downloadmpv-d10cebec1317d1fd9006f3bd3bdc6d75e399ebaa.tar.bz2
mpv-d10cebec1317d1fd9006f3bd3bdc6d75e399ebaa.tar.xz
player/video: subtract frame_time from delay when ao_chain starts audio
This seems more robust than relying on the audio status to actually be playing. For files where there is no audio or the audio start is delayed, this guards against that but it allows the subtraction to always occur otherwise on normal files with audio.
Diffstat (limited to 'player/audio.c')
-rw-r--r--player/audio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/player/audio.c b/player/audio.c
index 05a39cd819..da91dd4340 100644
--- a/player/audio.c
+++ b/player/audio.c
@@ -846,6 +846,7 @@ void audio_start_ao(struct MPContext *mpctx)
}
MP_VERBOSE(mpctx, "starting audio playback\n");
+ ao_c->audio_started = true;
ao_start(ao_c->ao);
mpctx->audio_status = STATUS_PLAYING;
if (ao_c->out_eof) {