10000 Remove useless `_get_stream_name` function · Powercoder64/ffmpeg-python@1a46471 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1a46471

Browse files
committed
Remove useless _get_stream_name function
1 parent 1070b3e commit 1a46471

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ffmpeg/_run.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222
)
2323

2424

25-
def _get_stream_name(name):
26-
return '{}'.format(name)
27-
28-
2925
def _convert_kwargs_to_cmd_line_args(kwargs):
3026
args = []
3127
for k in sorted(kwargs.keys()):
@@ -85,7 +81,7 @@ def _allocate_filter_stream_names(filter_nodes, outgoing_edge_maps, stream_name_
8581
# TODO: automatically insert `splits` ahead of time via graph transformation.
8682
raise ValueError('Encountered {} with multiple outgoing edges with same upstream label {!r}; a '
8783
'`split` filter is probably required'.format(upstream_node, upstream_label))
88-
stream_name_map[upstream_node, upstream_label] = _get_stream_name('s{}'.format(stream_count))
84+
stream_name_map[upstream_node, upstream_label] = 's{}'.format(stream_count)
8985
stream_count += 1
9086

9187

@@ -137,7 +133,7 @@ def get_args(stream_spec, overwrite_output=False):
137133
output_nodes = [node for node in sorted_nodes if isinstance(node, OutputNode)]
138134
global_nodes = [node for node in sorted_nodes if isinstance(node, GlobalNode)]
139135
filter_nodes = [node for node in sorted_nodes if isinstance(node, FilterNode)]
140-
stream_name_map = {(node, None): _get_stream_name(i) for i, node in enumerate(input_nodes)}
136+
stream_name_map = {(node, None): str(i) for i, node in enumerate(input_nodes)}
141137
filter_arg = _get_filter_arg(filter_nodes, outgoing_edge_maps, stream_name_map)
142138
args += reduce(operator.add, [_get_input_args(node) for node in input_nodes])
143139
if filter_arg:

0 commit comments

Comments
 (0)
0