restore-stream.lua: do not remove target.node manually

This is now done by the metadata implementation.
Doing this manually causes assertion failures, because then the
target.node is removed before policy-node "unhandles" the associated
session item and it tries to re-link it to the default source/sink
This commit is contained in:
George Kiagiadakis 2021-10-15 14:07:52 +03:00
parent bc0b43ac4d
commit 7e0eeb485c

View file

@ -389,12 +389,4 @@ streams_om:connect("object-added", function (streams_om, node)
node:connect("params-changed", saveStream)
restoreStream(node)
end)
streams_om:connect("object-removed", function (streams_om, node)
-- clear 'target.node' in case it was set
-- this needs fixing, it (partly) works only if metadata is WpImplMetadata
local metadata = metadata_om:lookup()
if metadata then
metadata:set(node["bound-id"], "target.node", nil, nil)
end
end)
streams_om:activate()