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:
Jonathan Thomas
2015-08-05 23:40:58 -05:00
parent 652aa3d659
commit 41dceadd1f
9 changed files with 108 additions and 104 deletions

View File

@@ -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++;