sync pyglet
This commit is contained in:
parent
263891a982
commit
e95c76f8a8
@ -109,7 +109,9 @@ class Player(pyglet.event.EventDispatcher):
|
|||||||
self._playlists = deque()
|
self._playlists = deque()
|
||||||
self._audio_player = None
|
self._audio_player = None
|
||||||
|
|
||||||
|
self._context = pyglet.gl.current_context
|
||||||
self._texture = None
|
self._texture = None
|
||||||
|
|
||||||
# Desired play state (not an indication of actual state).
|
# Desired play state (not an indication of actual state).
|
||||||
self._playing = False
|
self._playing = False
|
||||||
|
|
||||||
@ -455,9 +457,12 @@ class Player(pyglet.event.EventDispatcher):
|
|||||||
|
|
||||||
image = source.get_next_video_frame()
|
image = source.get_next_video_frame()
|
||||||
if image is not None:
|
if image is not None:
|
||||||
if self._texture is None:
|
|
||||||
self._create_texture()
|
with self._context:
|
||||||
self._texture.blit_into(image, 0, 0, 0)
|
if self._texture is None:
|
||||||
|
self._create_texture()
|
||||||
|
self._texture.blit_into(image, 0, 0, 0)
|
||||||
|
|
||||||
elif bl.logger is not None:
|
elif bl.logger is not None:
|
||||||
bl.logger.log("p.P.ut.1.8")
|
bl.logger.log("p.P.ut.1.8")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user