The vlc _reset_state logic should be wrapped within a lock context to make sure that two threads don't try to deallocate the context at the same time

This commit is contained in:
Fabio Manganiello 2021-02-28 20:56:32 +01:00
parent 833f810d4b
commit 0e3845ef88

View file

@ -51,6 +51,7 @@ class MediaVlcPlugin(MediaPlugin):
self._filename = None
self._monitor_thread: Optional[threading.Thread] = None
self._on_stop_event = threading.Event()
self._stop_lock = threading.RLock()
@classmethod
def _watched_event_types(cls):
@ -93,6 +94,7 @@ class MediaVlcPlugin(MediaPlugin):
self._reset_state()
def _reset_state(self):
with self._stop_lock:
self._latest_seek = None
self._title = None
self._filename = None