From 338a1286f7e3bc5c7ac77b05a9ccd5729cdf32fb Mon Sep 17 00:00:00 2001
From: Karl Kroening <karlk@kralnet.us>
Date: Sun, 7 Jan 2018 23:26:53 -0800
Subject: [PATCH] Fix issue with start_time=0

---
 ffmpeg/_run.py              | 4 ++--
 ffmpeg/tests/test_ffmpeg.py | 5 +++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ffmpeg/_run.py b/ffmpeg/_run.py
index 03e5a76..4e98b19 100644
--- a/ffmpeg/_run.py
+++ b/ffmpeg/_run.py
@@ -16,7 +16,7 @@ from .nodes import (
     get_stream_spec_nodes,
     FilterNode,
     GlobalNode,
-    InputNode,   
+    InputNode,
     OutputNode,
     output_operator,
 )
@@ -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
 
diff --git a/ffmpeg/tests/test_ffmpeg.py b/ffmpeg/tests/test_ffmpeg.py
index 7b2a6d7..1380fdb 100644
--- a/ffmpeg/tests/test_ffmpeg.py
+++ b/ffmpeg/tests/test_ffmpeg.py
@@ -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')