make overwrite_output=None default & False pass '-n' arg

This commit is contained in:
Curtiola 2025-03-22 15:20:46 -06:00
parent df129c7ba3
commit 66ac7f975a
No known key found for this signature in database
GPG Key ID: E8D8D7FDCDD568FA

View File

@ -149,7 +149,7 @@ def _get_output_args(node, stream_name_map):
@output_operator()
def get_args(stream_spec, overwrite_output=False):
def get_args(stream_spec, overwrite_output=None):
"""Build command-line arguments to be passed to ffmpeg."""
nodes = get_stream_spec_nodes(stream_spec)
args = []
@ -170,6 +170,8 @@ def get_args(stream_spec, overwrite_output=False):
args += reduce(operator.add, [_get_global_args(node) for node in global_nodes], [])
if overwrite_output:
args += ['-y']
elif overwrite_output == False:
args += ['-n']
return args