diff --git a/test/cmocka/known-flaky.txt b/test/cmocka/known-flaky.txt index a51586bc2a..1309178fe7 100644 --- a/test/cmocka/known-flaky.txt +++ b/test/cmocka/known-flaky.txt @@ -2,4 +2,3 @@ # Full-name matches only. Remove entries when their tracking issue is resolved. ^test_frontend_screenshot_srgb$ #3960 I010 and I210 orange cases intermittently sample a black program frame after a correct screenshot ^test_pulse_default_follow_pipewire$ #4944 default_output_unplugged still flakes after private-daemon serialization -^test_source_transition_slots$ #4680 clear assumes immediate weak expiry while the video tick may still own a reference (1/972 C reference under CPU-pinned stress) diff --git a/test/cmocka/test_source_transition_slots.c b/test/cmocka/test_source_transition_slots.c index 4e5255ba24..1d7c09e9ec 100644 --- a/test/cmocka/test_source_transition_slots.c +++ b/test/cmocka/test_source_transition_slots.c @@ -188,9 +188,12 @@ static void drop_child(size_t i) live.child[i] = NULL; } -/* Whether anything still holds a reference on child i. */ +/* Whether anything still holds a reference on child i. A video tick holds + * its own reference on every source while it ticks, so wait for the destroy + * queue (which waits a tick) before reading the weak reference (#4680). */ static bool child_alive(size_t i) { + obs_wait_for_destroy_queue(); obs_source_t *s = obs_weak_source_get_source(live.weak[i]); obs_source_release(s); return s != NULL;