diff options
Diffstat (limited to 'rotord/src/rotor.cpp')
| -rwxr-xr-x | rotord/src/rotor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rotord/src/rotor.cpp b/rotord/src/rotor.cpp index cf645c6..7580fee 100755 --- a/rotord/src/rotor.cpp +++ b/rotord/src/rotor.cpp @@ -286,10 +286,10 @@ bool Video_loader::load(const string &filename){ Image* Video_loader::output(const Frame_spec &frame){ if (isLoaded){ - int wanted=(((int) ((frame.time*frame.framerate)+0.5))%(player.getNumberOfFrames())); //+1 is necessary because 1st frame in a video is number 1? + int wanted=(((int) ((frame.time*frame.framerate)+0.5))%(player.getNumberOfFrames()-1))+1; //+1 is necessary because 1st frame in a video is number 1? if (!player.fetchFrame(frame.w,frame.h,wanted)) { //seek fail - cerr<<"Rotor: failed to seek frame"<<endl; + cerr<<"Rotor: failed to seek frame "<<wanted<<endl; if (image.w>0) return ℑ //just return the previous frame if possible else return nullptr; }; |
