Merge remote-tracking branch 'origin/master' into extra-examples

This commit is contained in:
Karl Kroening 2018-01-07 23:45:34 -08:00
commit c72c86e82f
2 changed files with 7 additions and 2 deletions

View File

@ -31,7 +31,7 @@ def _convert_kwargs_to_cmd_line_args(kwargs):
for k in sorted(kwargs.keys()):
v = kwargs[k]
args.append('-{}'.format(k))
if v:
if v is not None:
args.append('{}'.format(v))
return args

View File

@ -291,6 +291,11 @@ def test_merge_outputs():
]
def test__input__start_time():
assert ffmpeg.input('in', ss=10.5).output('out').get_args() == ['-ss', '10.5', '-i', 'in', 'out']
assert ffmpeg.input('in', ss=0.0).output('out').get_args() == ['-ss', '0.0', '-i', 'in', 'out']
def test_multi_passthrough():
out1 = ffmpeg.input('in1.mp4').output('out1.mp4')
out2 = ffmpeg.input('in2.mp4').output('out2.mp4')