Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b445b97

Browse files
committed
Fix FFMpegBase.isAvailable with detached terminals.
When checking for ffmpeg/libav, set stdin to /dev/null, otherwise the process will sleep if Python is running with a detached terminal. And we definitely don't want ffmpeg/libav to grab user input here.
1 parent ec0132f commit b445b97

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/animation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,8 @@ def isAvailable(cls):
597597
# NOTE: when removed, remove the same method in AVConvBase.
598598
and b'LibAv' not in subprocess.run(
599599
[cls.bin_path()], creationflags=subprocess_creation_flags,
600-
stdout=subprocess.DEVNULL, stderr=subprocess.PIPE).stderr)
600+
stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL,
601+
stderr=subprocess.PIPE).stderr)
601602

602603

603604
# Combine FFMpeg options with pipe-based writing

0 commit comments

Comments
 (0)