diff --git a/ffmpeg/dag.py b/ffmpeg/dag.py index 1caeca3..181ec8e 100644 --- a/ffmpeg/dag.py +++ b/ffmpeg/dag.py @@ -170,7 +170,8 @@ def topo_sort(start_nodes): child_map[node].append(child) if node not in sorted_nodes: marked_nodes.append(node) - [visit(parent, node) for parent in node._parents] + parents = [edge.upstream_node for edge in node.incoming_edges] + [visit(parent, node) for parent in parents] marked_nodes.remove(node) sorted_nodes.append(node) unmarked_nodes = list(copy.copy(start_nodes))