Skip to content

Commit bec21b1

Browse files
committed
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.
1 parent c29174f commit bec21b1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/DummyReader.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ namespace openshot
5353
* A dummy reader can be created with any framerate or samplerate. This is useful in unit
5454
* tests that need to test different framerates or samplerates.
5555
*
56+
* @note Timeline does buffering by requesting more frames than it
57+
* strictly needs. Thus if you use this DummyReader with a custom
58+
* cache in a Timeline, make sure it has enough
59+
* frames. Specifically you need some frames after the last frame
60+
* you plan to access through the Timeline.
61+
*
5662
* @code
5763
* // Create cache object to store fake Frame objects
5864
* CacheMemory cache;

0 commit comments

Comments
 (0)