mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
handle interrupted system call errors on mplayer shutdown
This commit is contained in:
parent
e578ffc721
commit
fb8f2bd09f
1 changed files with 7 additions and 1 deletions
|
@ -164,7 +164,13 @@ def clearMplayerQueue():
|
|||
def stopMplayer():
|
||||
mplayerCond.acquire()
|
||||
if mplayerManager.mplayer:
|
||||
mplayerManager.mplayer.communicate("quit\n")
|
||||
while 1:
|
||||
try:
|
||||
mplayerManager.mplayer.communicate("quit\n")
|
||||
break
|
||||
except OSError:
|
||||
# osx throws these regularly
|
||||
pass
|
||||
mplayerManager.mplayer = -1
|
||||
mplayerCond.notify()
|
||||
mplayerCond.release()
|
||||
|
|
Loading…
Reference in a new issue