Trying to fix nasty race condition SHUTDOWN->START_FILE that triggers a spurious MediaStopEvent

This commit is contained in:
Fabio Manganiello 2019-02-19 11:09:22 +01:00
parent 10fa7c1ab1
commit dcec3329d4

View file

@ -88,7 +88,7 @@ class MediaMpvPlugin(MediaPlugin):
elif evt == Event.UNPAUSE: elif evt == Event.UNPAUSE:
bus.post(MediaPlayEvent(resource=self._get_current_resource())) bus.post(MediaPlayEvent(resource=self._get_current_resource()))
elif evt == Event.END_FILE or evt == Event.SHUTDOWN: elif evt == Event.END_FILE or evt == Event.SHUTDOWN:
playback_rebounced = playback_rebounce_event.wait(timeout=1) playback_rebounced = playback_rebounce_event.wait(timeout=2)
if playback_rebounced: if playback_rebounced:
playback_rebounce_event.clear() playback_rebounce_event.clear()
return return