8000 Merge pull request #417 from 0x3333/master · kkroening/ffmpeg-python@0612a44 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0612a44

Browse files
authored
Merge pull request #417 from 0x3333/master
Fix issue #195. Redirect stdout/err to /dev/null
2 parents e044890 + 0ec6e69 commit 0612a44

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ffmpeg/_run.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,11 @@ def run_async(
279279
"""
280280
args = compile(stream_spec, cmd, overwrite_output=overwrite_output)
281281
stdin_stream = subprocess.PIPE if pipe_stdin else None
282-
stdout_stream = subprocess.PIPE if pipe_stdout or quiet else None
283-
stderr_stream = subprocess.PIPE if pipe_stderr or quiet else None
282+
stdout_stream = subprocess.PIPE if pipe_stdout else None
283+
stderr_stream = subprocess.PIPE if pipe_stderr else None
284+
if quiet:
285+
stderr_stream = subprocess.STDOUT
286+
stdout_stream = subprocess.DEVNULL
284287
return subprocess.Popen(
285288
args, stdin=stdin_stream, stdout=stdout_stream, stderr=stderr_stream
286289
)

0 commit comments

Comments
 (0)
0