mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -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():
|
def stopMplayer():
|
||||||
mplayerCond.acquire()
|
mplayerCond.acquire()
|
||||||
if mplayerManager.mplayer:
|
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
|
mplayerManager.mplayer = -1
|
||||||
mplayerCond.notify()
|
mplayerCond.notify()
|
||||||
mplayerCond.release()
|
mplayerCond.release()
|
||||||
|
|
Loading…
Reference in a new issue