You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Removed Cache::Exists method, which created all sorts of havoc when being called in quick succession (basically a frame might exist a split second before calling Cache::GetFrame, but then be missing when GetFrame is called).
Next Syntax: frame = Cache::GetFrame(...) if frame: .... Also, fixed some issues with MP3 files having the wrong video length detected, and a few other minor issues.
This commit is contained in:
@@ -87,8 +87,17 @@ namespace openshot
|
||||
while ((position - current_display_frame) < max_frames)
|
||||
{
|
||||
// Only cache up till the max_frames amount... then sleep
|
||||
if (reader)
|
||||
reader->GetFrame(position);
|
||||
try
|
||||
{
|
||||
if (reader)
|
||||
// Force the frame to be generated
|
||||
reader->GetFrame(position);
|
||||
|
||||
}
|
||||
catch (const OutOfBoundsFrame & e)
|
||||
{
|
||||
// Ignore out of bounds frame exceptions
|
||||
}
|
||||
|
||||
// Increment frame number
|
||||
position++;
|
||||
|
||||
Reference in New Issue
Block a user