From f92d19a24efd236f7c706fca2ce634d3e00a83ec Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 16 Mar 2021 19:42:59 +0100 Subject: [PATCH] media.vlc.stop should be synchronized on the _stop_lock and should call _reset_state instead of simply setting self._player = None --- platypush/plugins/media/vlc.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/platypush/plugins/media/vlc.py b/platypush/plugins/media/vlc.py index 08dc03388..82fd2836b 100644 --- a/platypush/plugins/media/vlc.py +++ b/platypush/plugins/media/vlc.py @@ -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):