From b7dec57a84771328770f3054a28d8d83ce2ae6fe Mon Sep 17 00:00:00 2001 From: Yuvaraj <119717169+Yuva1024@users.noreply.github.com> Date: Sat, 10 Oct 2026 19:25:28 +0530 Subject: [PATCH] test(avplayer): stop the unsynced test racing the player's auto-start TestUnsyncedVideoKeepsUpWithAudio built its player without an event callback, which enables auto-start (autoStartEnabled = init.auto_start || callback.event_callback == nullptr). The controller thread then enables the streams and starts playback shortly after the source is added, racing the test's own sceAvPlayerEnableStream. When the controller won, Source::EnableStream saw started == true and the test failed with "enable video failed". The test now passes an Events object, as the other tests that drive the player by hand do. Co-Authored-By: Claude Sonnet 5.5 --- core/libs/tests/GuestAvPlayer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/libs/tests/GuestAvPlayer.cpp b/core/libs/tests/GuestAvPlayer.cpp index 2fb32a5db..14206efd2 100644 --- a/core/libs/tests/GuestAvPlayer.cpp +++ b/core/libs/tests/GuestAvPlayer.cpp @@ -1035,7 +1035,8 @@ void TestPs5ExtendedInitLayout() { } void TestUnsyncedVideoKeepsUpWithAudio() { - AvPlayerInitData init = InitData(nullptr); + Events events; + AvPlayerInitData init = InitData(&events); auto* player = sceAvPlayerInit(&init); Check(player != nullptr, "init failed"); Check(sceAvPlayerSetAvSyncMode(player, 1) == 0, "sync mode rejected");