mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 00:22:57 -05:00
test(avplayer): wait for the frame in the sync tolerance check
The sync tolerance test asked for the next frame once, without waiting, so on a loaded runner a decoder that had not queued frame 1 yet failed the delivery check, and the premature-delivery check passed for the same reason. Poll for the frame in both checks: with a bounded wait for the premature case and the usual wait for delivery.
This commit is contained in:
1 parent
cecb540a63
commit
f40e1b68c8
1 file changed
+2
-2
@@ -1596,9 +1596,9 @@ void TestVideoSyncTolerance() {
|
||||
Check(WaitFor([&] { return sceAvPlayerGetVideoDataEx(player, &frame) != 0; }), "sync tolerance first frame missing");
|
||||
Check(FrameIndex(frame.timestamp) == 0, "first frame not index 0");
|
||||
AvPlayer::SetAvPlayerClockForTest_nid_no_patch(player, 5.0);
|
||||
Check(!sceAvPlayerGetVideoDataEx(player, &frame), "frame beyond sync tolerance delivered prematurely");
|
||||
Check(!WaitFor([&] { return sceAvPlayerGetVideoDataEx(player, &frame) != 0; }, 200), "frame beyond sync tolerance delivered prematurely");
|
||||
AvPlayer::SetAvPlayerClockForTest_nid_no_patch(player, 10.0);
|
||||
Check(sceAvPlayerGetVideoDataEx(player, &frame), "frame within sync tolerance was not delivered");
|
||||
Check(WaitFor([&] { return sceAvPlayerGetVideoDataEx(player, &frame) != 0; }), "frame within sync tolerance was not delivered");
|
||||
Check(FrameIndex(frame.timestamp) == 1, "unexpected second frame index");
|
||||
Check(sceAvPlayerClose(player) == 0, "sync tolerance close failed");
|
||||
std::lock_guard lock(allocations.mutex);
|
||||
|
||||
Reference in new issue
Block a user