Commit 52763206654199e94f166803405355de7ce0e5ac

Authored by Charles Otto
1 parent 4db5b304

Don't output unneeded copies of the src templates in stream

Showing 1 changed file with 5 additions and 3 deletions
openbr/plugins/stream.cpp
... ... @@ -363,7 +363,7 @@ public:
363 363 return this->templates.size();
364 364 }
365 365  
366   - bool open(TemplateList & input, br::Idiocy::StreamModes _mode)
  366 + bool open(const TemplateList & input, br::Idiocy::StreamModes _mode)
367 367 {
368 368 // Set up variables specific to us
369 369 current_template_idx = 0;
... ... @@ -1030,8 +1030,10 @@ public:
1030 1030 void projectUpdate(const TemplateList & src, TemplateList & dst)
1031 1031 {
1032 1032 dst = src;
  1033 + if (src.empty())
  1034 + return;
1033 1035  
1034   - bool res = readStage->dataSource.open(dst,readMode);
  1036 + bool res = readStage->dataSource.open(src,readMode);
1035 1037 if (!res) {
1036 1038 qDebug("stream failed to open %s", qPrintable(dst[0].file.name));
1037 1039 return;
... ... @@ -1075,9 +1077,9 @@ public:
1075 1077 final_output.append(output_set);
1076 1078 }
1077 1079  
  1080 + dst.clear();
1078 1081 // dst is set to all output received by the final stage, along
1079 1082 // with anything output via the calls to finalize.
1080   - //dst = collectionStage->getOutput();
1081 1083 foreach(const TemplateList & list, collector->sets) {
1082 1084 dst.append(list);
1083 1085 }
... ...