node: fixed issue with "taking" values from input tables
As opposed to simply leaving all values in the table, nodes can now "take" values that they use to free up memory (e.g. "taking" input buffers if they're used to produce an output buffer). This is a fairly large change, expect regressions.
This commit is contained in:
@@ -100,16 +100,15 @@ TimeRange ClipBlock::OutputTimeAdjustment(NodeInput *input, const TimeRange &inp
|
||||
return Block::InputTimeAdjustment(input, input_time);
|
||||
}
|
||||
|
||||
NodeValueTable ClipBlock::Value(const NodeValueDatabase &value) const
|
||||
NodeValueTable ClipBlock::Value(NodeValueDatabase &value) const
|
||||
{
|
||||
// We discard most values here except for the buffer we received
|
||||
NodeValueTable table;
|
||||
NodeValue data = value[texture_input()].GetWithMeta(NodeParam::kBuffer);
|
||||
|
||||
NodeValueTable table;
|
||||
if (data.type() != NodeParam::kNone) {
|
||||
table.Push(data);
|
||||
}
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
|
||||
virtual TimeRange OutputTimeAdjustment(NodeInput* input, const TimeRange& input_time) const override;
|
||||
|
||||
virtual NodeValueTable Value(const NodeValueDatabase& value) const override;
|
||||
virtual NodeValueTable Value(NodeValueDatabase& value) const override;
|
||||
|
||||
virtual void Retranslate() override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user