summaryrefslogtreecommitdiff
path: root/rotord/graph.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@herge.(none)>2013-07-05 18:03:58 +0100
committerTim Redfern <tim@herge.(none)>2013-07-05 18:03:58 +0100
commit4d1989594aa1baed540643b118e7b25a42ea1de1 (patch)
treeae1e5e0b0510a0da05ed7237292af3074577824d /rotord/graph.cpp
parent28cb6bdc4ad953433b7fc184181e116ac169987f (diff)
fixed bug that crashes with empty video slot
Diffstat (limited to 'rotord/graph.cpp')
-rw-r--r--rotord/graph.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/rotord/graph.cpp b/rotord/graph.cpp
index a6e1603..e3b0669 100644
--- a/rotord/graph.cpp
+++ b/rotord/graph.cpp
@@ -32,6 +32,13 @@ bool Graph::signal_render(string &signal_xml,const float framerate) {
return false;
}
bool Graph::video_render(const string &output_filename,const string &audio_filename,const float framerate,float& progress) {
+ vector<Node*> loaders=find_nodes("video_loader");
+ for (auto i:loaders){
+ if (!dynamic_cast<Video_loader*>(i)->isLoaded) {
+ cerr<<"Rotor: all loaders must be populated before rendering"<<endl;
+ return false;
+ }
+ }
if (find_node("video_output")) {
Video_output *video_output=dynamic_cast<Video_output*>(find_node("video_output"));
return video_output->render(duration,framerate,output_filename,audio_filename,progress,outW,outH);