player/audio: invert audio_started boolean

Waiting for audio_started to be set to true takes too long which causes
us to miss it for the first frame, instead invert the condition so it's
set on the first frame.

Fixes #14615
This commit is contained in:
llyyr
2024-08-01 03:35:29 +05:30
committed by Dudemanguy
parent 24f42acd1d
commit 11ed012c34
3 changed files with 5 additions and 3 deletions

View File

@@ -388,7 +388,7 @@ static void handle_new_frame(struct MPContext *mpctx)
}
}
mpctx->time_frame += frame_time / mpctx->video_speed;
if (mpctx->ao_chain && mpctx->ao_chain->audio_started)
if (mpctx->ao_chain && !mpctx->ao_chain->delaying_audio_start)
mpctx->delay -= frame_time;
if (mpctx->video_status >= STATUS_PLAYING)
adjust_sync(mpctx, pts, frame_time);