summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rotord/rotord.cbp6
-rwxr-xr-xrotord/src/libavwrapper.cpp1
-rwxr-xr-xrotord/src/rotor.cpp4
3 files changed, 7 insertions, 4 deletions
diff --git a/rotord/rotord.cbp b/rotord/rotord.cbp
index 6ee182e..ece9709 100644
--- a/rotord/rotord.cbp
+++ b/rotord/rotord.cbp
@@ -8,7 +8,8 @@
<Option compiler="gcc" />
<Build>
<Target title="Debug">
- <Option output="rotord" prefix_auto="1" extension_auto="1" />
+ <Option output="bin/rotord" prefix_auto="1" extension_auto="1" />
+ <Option working_dir="bin" />
<Option object_output="/home/tim/workspace/rotor/rotord/.objs" />
<Option type="1" />
<Option compiler="gcc" />
@@ -25,7 +26,8 @@
</MakeCommands>
</Target>
<Target title="Release">
- <Option output="rotord" prefix_auto="1" extension_auto="1" />
+ <Option output="bin/rotord" prefix_auto="1" extension_auto="1" />
+ <Option working_dir="bin" />
<Option object_output="/home/tim/workspace/rotor/rotord/.objs" />
<Option type="1" />
<Option compiler="gcc" />
diff --git a/rotord/src/libavwrapper.cpp b/rotord/src/libavwrapper.cpp
index c544b33..4e545ac 100755
--- a/rotord/src/libavwrapper.cpp
+++ b/rotord/src/libavwrapper.cpp
@@ -888,6 +888,7 @@ bool libav::exporter::record(std::string filename){
video_st = add_stream(oc, &video_codec, fmt->video_codec);
}
if (fmt->audio_codec != AV_CODEC_ID_NONE) {
+ //audio_st = add_stream(oc, &audio_codec, fmt->audio_codec);
audio_st = add_stream(oc, &audio_codec, fmt->audio_codec);
}
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 &image; //just return the previous frame if possible
else return nullptr;
};