sync pyglet

This commit is contained in:
shenjack 2023-10-07 22:03:53 +08:00
parent 263891a982
commit e95c76f8a8
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -109,7 +109,9 @@ class Player(pyglet.event.EventDispatcher):
self._playlists = deque()
self._audio_player = None
self._context = pyglet.gl.current_context
self._texture = None
# Desired play state (not an indication of actual state).
self._playing = False
@ -455,9 +457,12 @@ class Player(pyglet.event.EventDispatcher):
image = source.get_next_video_frame()
if image is not None:
if self._texture is None:
self._create_texture()
self._texture.blit_into(image, 0, 0, 0)
with self._context:
if self._texture is None:
self._create_texture()
self._texture.blit_into(image, 0, 0, 0)
elif bl.logger is not None:
bl.logger.log("p.P.ut.1.8")