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

View file

@ -217,11 +217,12 @@ class MediaVlcPlugin(MediaPlugin):
@action
def quit(self):
""" Quit the player (same as `stop`) """
with self._stop_lock:
if not self._player:
return None, 'No vlc instance is running'
self._player.stop()
self._player = None
self._reset_state()
return self.status()
@action