From 7f40303e31a1fe1d9a57e8078b5437b314f6a4a8 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 22 May 2017 15:41:29 +1000 Subject: [PATCH] don't inherit ld_library_path when calling mplayer --- anki/sound.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/anki/sound.py b/anki/sound.py index f68ab9dd7..28569b9e0 100644 --- a/anki/sound.py +++ b/anki/sound.py @@ -148,9 +148,12 @@ class MplayerMonitor(threading.Thread): try: cmd = mplayerCmd + ["-slave", "-idle"] devnull = file(os.devnull, "w") + env = os.environ.copy() + if "LD_LIBRARY_PATH" in env: + del env['LD_LIBRARY_PATH'] self.mplayer = subprocess.Popen( cmd, startupinfo=si, stdin=subprocess.PIPE, - stdout=devnull, stderr=devnull) + stdout=devnull, stderr=devnull, env=env) except OSError: mplayerEvt.clear() raise Exception("Did you install mplayer?")