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:
parent
833f810d4b
commit
0e3845ef88
1 changed files with 14 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue