summaryrefslogtreecommitdiff
path: root/rotord/src
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-08-26 14:56:44 +0100
committerTim Redfern <tim@eclectronics.org>2013-08-26 14:56:44 +0100
commitb4b1e2630c95d5e6014463f7608d59dc2322a3b8 (patch)
treedad77bd8b9c49e7c2adb7d706a3883bf4725973d /rotord/src
parent2cd5c8bcf0602e5435da295bb5873504b8969bfd (diff)
adding ffmpeg
Diffstat (limited to 'rotord/src')
-rwxr-xr-xrotord/src/rotor.cpp4
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){