From bec21b1c7719e50d2a0e97f4fee83997cfa8f2f5 Mon Sep 17 00:00:00 2001 From: Daniel Jour Date: Fri, 12 Jun 2020 22:30:54 +0200 Subject: [PATCH] Add a note about the buffering behavior of Timeline to DummyReader Using DummyReader with a custom cache with a Timeline can lead to strange exceptions due to Timeline's buffering. Therefore adding a note to the DummyReader documentation about that. --- include/DummyReader.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/DummyReader.h b/include/DummyReader.h index e9c90968a..9a75751d0 100644 --- a/include/DummyReader.h +++ b/include/DummyReader.h @@ -53,6 +53,12 @@ namespace openshot * A dummy reader can be created with any framerate or samplerate. This is useful in unit * tests that need to test different framerates or samplerates. * + * @note Timeline does buffering by requesting more frames than it + * strictly needs. Thus if you use this DummyReader with a custom + * cache in a Timeline, make sure it has enough + * frames. Specifically you need some frames after the last frame + * you plan to access through the Timeline. + * * @code * // Create cache object to store fake Frame objects * CacheMemory cache;