summaryrefslogtreecommitdiff
path: root/rotord/rotor.cpp
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2013-07-03 03:04:47 +0100
committerComment <tim@gray.(none)>2013-07-03 03:04:47 +0100
commit379251337ac5806cf98047c3fc308d932b1aefab (patch)
tree5ff932df86fec52543541129db7825a1c1e50934 /rotord/rotor.cpp
parentd77afa02389ecaf1858c94e80530345610907a28 (diff)
found a major bug in render timeline
Diffstat (limited to 'rotord/rotor.cpp')
-rwxr-xr-xrotord/rotor.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/rotord/rotor.cpp b/rotord/rotor.cpp
index 33b8597..7985c40 100755
--- a/rotord/rotor.cpp
+++ b/rotord/rotor.cpp
@@ -294,7 +294,7 @@ bool Video_output::render(const float duration, const float framerate,const stri
//[libx264 @ 0x7fffe8003940] 264 - core 123 r2189 35cf912 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=10 keyint_min=1 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=abr mbtree=1 bitrate=400 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
//Assertion ff_avcodec_locked failed at libavcodec/utils.c:2967
-
+ //cerr<<"videoloader: "<<vf<<" seconds, vstep "<<vstep<<" ,asking for frame "<<((int)((vf*framerate)+0.5))<<endl;
Image* i=get_output(Frame_spec(vf,framerate,duration,outW,outH));
if (i) {
@@ -380,13 +380,15 @@ Image* Video_loader::output(const Frame_spec &frame){
*/
if (isLoaded){
- int wanted=((int) (frame.time*frame.framerate))%(player.getNumberOfFrames()); //-2?? this would give division by zero
+ int wanted=(((int) ((frame.time*frame.framerate)+0.5))%(player.getNumberOfFrames()))+1; //-2?? this would give division by zero
//if (wanted==99){
// cerr<<"videoloader: near the end"<<endl;
//}
+ //cerr<<"videoloader: getting frame "<<wanted<<endl;
+
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;