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:
Fabio Manganiello 2021-03-16 19:42:59 +01:00
parent ce0ca2e9ee
commit f92d19a24e
1 changed files with 6 additions and 5 deletions

View File

@ -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):