summaryrefslogtreecommitdiff
path: root/rotord
diff options
context:
space:
mode:
authorTim Redfern <tim@herge.(none)>2013-05-08 13:04:15 +0100
committerTim Redfern <tim@herge.(none)>2013-05-08 13:04:15 +0100
commit39b71890f5f17c0c5d2c6730a068c2b8e77afd28 (patch)
tree91f023d7e48a07ecd34f315b0df69f628d8fb38a /rotord
parent147f2d29a85cb1af80459546d95857e1ce3344f3 (diff)
full length rendering
Diffstat (limited to 'rotord')
-rwxr-xr-xrotord/rotor.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/rotord/rotor.cpp b/rotord/rotor.cpp
index c25fed4..209439b 100755
--- a/rotord/rotor.cpp
+++ b/rotord/rotor.cpp
@@ -181,14 +181,13 @@ bool Video_output::render(const float duration, const float framerate,const stri
float v=0.0f;
float vf=0.0f;
float af=0.0f;
- while (vf<duration) {
+ while (vf<duration-vstep) {
while (fless(vf,af)) {
//insert audio frames until we are ahead of the video
exporter->encodeFrame(audioloader.get_samples(exporter->get_audio_framesize()));
af+=exporter->get_audio_step();
}
-
Image* i=get_output(Frame_spec(vf,framerate,outW,outH));
if (i) {
exporter->encodeFrame(i->RGBdata);
@@ -241,7 +240,7 @@ Image* Video_input::get_output(const Frame_spec &frame){
//trace frame that is being read
if (player->isLoaded()){
//player->setPosition(frame.time);
- int wanted=((int) (frame.time*frame.framerate))%(player->getTotalNumFrames()-1);
+ int wanted=((int) (frame.time*frame.framerate))%(player->getTotalNumFrames()-2); //-2??
player->setFrame(wanted);
//while (player->getCurrentFrame()!=wanted){
// cerr << "seeking to "<<wanted<<" :"<<player->getCurrentFrame()<<endl;