media.vlc.stop should be synchronized on the _stop_lock and should call _reset_state instead of simply setting self._player = None
This commit is contained in:
parent
ce0ca2e9ee
commit
f92d19a24e
1 changed files with 6 additions and 5 deletions
|
@ -217,12 +217,13 @@ class MediaVlcPlugin(MediaPlugin):
|
|||
@action
|
||||
def quit(self):
|
||||
""" Quit the player (same as `stop`) """
|
||||
if not self._player:
|
||||
return None, 'No vlc instance is running'
|
||||
with self._stop_lock:
|
||||
if not self._player:
|
||||
return None, 'No vlc instance is running'
|
||||
|
||||
self._player.stop()
|
||||
self._player = None
|
||||
return self.status()
|
||||
self._player.stop()
|
||||
self._reset_state()
|
||||
return self.status()
|
||||
|
||||
@action
|
||||
def stop(self):
|
||||
|
|
Loading…
Reference in a new issue