don't inherit ld_library_path when calling mplayer

This commit is contained in:
Damien Elmes 2017-05-22 15:41:29 +10:00
parent d37e6fc78b
commit 7f40303e31

View file

@ -148,9 +148,12 @@ class MplayerMonitor(threading.Thread):
try: try:
cmd = mplayerCmd + ["-slave", "-idle"] cmd = mplayerCmd + ["-slave", "-idle"]
devnull = file(os.devnull, "w") devnull = file(os.devnull, "w")
env = os.environ.copy()
if "LD_LIBRARY_PATH" in env:
del env['LD_LIBRARY_PATH']
self.mplayer = subprocess.Popen( self.mplayer = subprocess.Popen(
cmd, startupinfo=si, stdin=subprocess.PIPE, cmd, startupinfo=si, stdin=subprocess.PIPE,
stdout=devnull, stderr=devnull) stdout=devnull, stderr=devnull, env=env)
except OSError: except OSError:
mplayerEvt.clear() mplayerEvt.clear()
raise Exception("Did you install mplayer?") raise Exception("Did you install mplayer?")