mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
reduce the chances of a race condition in mplayer code
Not perfect, it may still happen. https://anki.tenderapp.com/discussions/ankidesktop/39832-an-error-occurred-audio
This commit is contained in:
parent
f889616ef1
commit
84eaf43525
1 changed files with 3 additions and 2 deletions
|
@ -393,8 +393,9 @@ class SimpleMplayerSlaveModePlayer(SimpleMplayerPlayer):
|
||||||
|
|
||||||
The trailing newline is automatically added."""
|
The trailing newline is automatically added."""
|
||||||
str_args = [str(x) for x in args]
|
str_args = [str(x) for x in args]
|
||||||
self._process.stdin.write(" ".join(str_args).encode("utf8") + b"\n")
|
if self._process:
|
||||||
self._process.stdin.flush()
|
self._process.stdin.write(" ".join(str_args).encode("utf8") + b"\n")
|
||||||
|
self._process.stdin.flush()
|
||||||
|
|
||||||
def seek_relative(self, secs: int) -> None:
|
def seek_relative(self, secs: int) -> None:
|
||||||
self.command("seek", secs, 0)
|
self.command("seek", secs, 0)
|
||||||
|
|
Loading…
Reference in a new issue