diff options
| author | Tim Redfern <tim@herge.(none)> | 2013-08-01 15:36:47 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@herge.(none)> | 2013-08-01 15:36:47 +0100 |
| commit | 163b7f165d40289c03cebb9d9d8c8618e01ef0db (patch) | |
| tree | 042e114b5299226ad52957247f1a5c8a21b9862b /rotord | |
| parent | 994a4bc5538b96f2811b653a7a8ccfa8fd2294b6 (diff) | |
video loader first frame tweak
Diffstat (limited to 'rotord')
| -rw-r--r-- | rotord/rotord.cbp | 6 | ||||
| -rwxr-xr-x | rotord/src/libavwrapper.cpp | 1 | ||||
| -rwxr-xr-x | rotord/src/rotor.cpp | 4 |
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 ℑ //just return the previous frame if possible else return nullptr; }; |
