summaryrefslogtreecommitdiff
path: root/rotord/rotor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/rotor.cpp')
-rwxr-xr-xrotord/rotor.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/rotord/rotor.cpp b/rotord/rotor.cpp
index 2fa5183..37af5a1 100755
--- a/rotord/rotor.cpp
+++ b/rotord/rotor.cpp
@@ -377,12 +377,14 @@ Image* Video_loader::output(const Frame_spec &frame){
*/
if (isLoaded){
- int wanted=((int) (frame.time*frame.framerate))%(player.getNumberOfFrames()-2); //-2??
- if (!player.fetchFrame(frame.w,frame.h,wanted)) { cerr<<"Rotor: frame returned false"<<endl; };
+ int wanted=((int) (frame.time*frame.framerate))%(player.getNumberOfFrames()); //-2?? this would give division by zero
+ if (!player.fetchFrame(frame.w,frame.h,wanted)) { cerr<<"Rotor: frame returned false"<<endl; return nullptr; };
image.setup_fromRGB(frame.w,frame.h,player.pFrameRGB->data[0]);
return &image;
}
+ //confusingly, crashes with files not made with ffmpeg/ short files?
+
return nullptr;
};