diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-08-26 14:56:44 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-08-26 14:56:44 +0100 |
| commit | b4b1e2630c95d5e6014463f7608d59dc2322a3b8 (patch) | |
| tree | dad77bd8b9c49e7c2adb7d706a3883bf4725973d /rotord/src/rotor.cpp | |
| parent | 2cd5c8bcf0602e5435da295bb5873504b8969bfd (diff) | |
adding ffmpeg
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 8b52301..bbae972 100755 --- a/rotord/src/rotor.cpp +++ b/rotord/src/rotor.cpp @@ -347,10 +347,10 @@ Image* Video_loader::output(const Frame_spec &frame){ int wanted; if (attributes["mode"]->intVal==VIDEOFRAMES_frame) { - wanted=(((int) ((frame.time*frame.framerate)+0.5))%(player.getNumberOfFrames()))+1; //+1 is necessary because 1st frame in a video is number 1? + wanted=(((int) ((frame.time*frame.framerate)+0.5))%max(1,player.getNumberOfFrames()-1))+1; //+1 is necessary because 1st frame in a video is number 1? } if (attributes["mode"]->intVal==VIDEOFRAMES_blend) { - wanted=(((int) ((frame.time*frame.framerate*clipspeed)+0.5))%(player.getNumberOfFrames()))+1; //+1 is necessary because 1st frame in a video is number 1? + wanted=(((int) ((frame.time*frame.framerate*clipspeed)+0.5))%max(1,player.getNumberOfFrames()-1))+1; //+1 is necessary because 1st frame in a video is number 1? } if (wanted!=lastframe){ |
