- Timeline composition no longer mutates cached clip frames (fixes trails/ghosting).

- Clip updates via ApplyJsonDiff now also clear clip cache (not just timeline/reader ranges).
- Added regressions for cache invalidation + no cached-frame mutation; kept paused preroll/cache-bar behavior intact.
This commit is contained in:
Jonathan Thomas
2026-03-01 14:19:27 -06:00
parent c74b07a21e
commit 4387f8b394
8 changed files with 208 additions and 7 deletions

View File

@@ -318,7 +318,7 @@ TEST_CASE("prefetchWindow: interrupt on userSeeked flag", "[VideoCacheThread]")
CHECK(!wasFull);
}
TEST_CASE("Seek preview: inside cache is cheap and does not invalidate", "[VideoCacheThread]") {
TEST_CASE("Seek preview: evicts playhead frame to force fresh render", "[VideoCacheThread]") {
TestableVideoCacheThread thread;
CacheMemory cache(/*max_bytes=*/100000000);
Timeline timeline(/*width=*/1280, /*height=*/720, /*fps=*/Fraction(24,1),
@@ -335,8 +335,8 @@ TEST_CASE("Seek preview: inside cache is cheap and does not invalidate", "[Video
CHECK(thread.isScrubbing());
CHECK(thread.getUserSeekedFlag());
CHECK(!thread.getPrerollOnNextFill());
CHECK(cache.Contains(100));
CHECK(cache.Count() >= 2);
CHECK(!cache.Contains(100));
CHECK(cache.Count() >= 1);
}
TEST_CASE("Seek preview: outside cache marks uncached without preroll", "[VideoCacheThread]") {