From 873f295e28a20e2e774852d8d7010ff5629549b4 Mon Sep 17 00:00:00 2001 From: Comment Date: Fri, 27 Sep 2013 19:36:29 -0400 Subject: fixed crash when no node specified to load video --- rotord/src/graph.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'rotord/src/graph.cpp') diff --git a/rotord/src/graph.cpp b/rotord/src/graph.cpp index b94d04c..f904a9d 100644 --- a/rotord/src/graph.cpp +++ b/rotord/src/graph.cpp @@ -79,7 +79,7 @@ bool Graph::preview(xmlIO &XML,string &node,string &_format,int frame,int w,int return false; } -bool Graph::video_render(const string &output_filename,const float framerate) { +bool Graph::video_render(const string &output_filename,const float framerate,int start, int stop) { //https://www.adobe.com/devnet/video/articles/mp4_movie_atom.html //https://www.google.ie/search?q=ffmbc&aq=f&oq=ffmbc&aqs=chrome.0.57j0l2j60j0j60.4360j0&sourceid=chrome&ie=UTF-8#q=ffmbc+git @@ -130,9 +130,9 @@ bool Graph::video_render(const string &output_filename,const float framerate) { //25fps video and 43.06640625fps audio? hmm //how to get the timecodes correct for the interleaved files - struct timeval start, end; + struct timeval _start, _end; - gettimeofday(&start, NULL); + gettimeofday(&_start, NULL); uint16_t *audioframe=nullptr; uint16_t *audio=nullptr; @@ -148,13 +148,13 @@ bool Graph::video_render(const string &output_filename,const float framerate) { float vstep=1.0f/framerate; float v=0.0f; - float vf=0.0f; - float af=0.0f; + float vf=start*vstep; + float af=start*vstep; int aoffs=0; int audioend=0; Audio_frame *a; - int64_t sample_start=0; - while (vf