summaryrefslogtreecommitdiff
path: root/rotord/rotor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/rotor.cpp')
-rwxr-xr-xrotord/rotor.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/rotord/rotor.cpp b/rotord/rotor.cpp
index 2d33755..3166de8 100755
--- a/rotord/rotor.cpp
+++ b/rotord/rotor.cpp
@@ -379,16 +379,22 @@ Image* Video_loader::output(const Frame_spec &frame){
*/
if (isLoaded){
- int wanted=(((int) ((frame.time*frame.framerate)+0.5))%(player.getNumberOfFrames()))+1; //+1 is necessary because 1st frame in a video is number 1?
+ int wanted=(((int) ((frame.time*frame.framerate)+0.5))%(player.getNumberOfFrames())); //+1 is necessary because 1st frame in a video is number 1?
//if (wanted==99){
// cerr<<"videoloader: near the end"<<endl;
//}
- //cerr<<"videoloader: getting frame "<<wanted<<endl;
+ //cerr<<"videoloader: requesting frame "<<wanted<<endl;
+ //if (wanted==68) {
+ // int nothing=0;
+ //}
- if (!player.fetchFrame(frame.w,frame.h,wanted)) { cerr<<"Rotor: frame returned false"<<endl; return nullptr; };
+ 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;
}