Skip to content

Commit

Permalink
Fix #256 - un-associate StreamingSources from deleted Player instance.
Browse files Browse the repository at this point in the history
  • Loading branch information
benmoran56 committed Jun 12, 2021
1 parent 0a1a859 commit d8edc4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
12 changes: 0 additions & 12 deletions pyglet/media/codecs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,18 +410,6 @@ class StreamingSource(Source):
:class:`~pyglet.media.player.Player`.
"""

@property
def is_queued(self):
"""
bool: Determine if this source is a player current source.
Check on a :py:class:`~pyglet.media.player.Player` if this source
is the current source.
:deprecated: Use :attr:`is_player_source` instead.
"""
return self.is_player_source

def get_queue_source(self):
"""Return the ``Source`` to be used as the source for a player.
Expand Down
2 changes: 2 additions & 0 deletions pyglet/media/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ def delete(self):
The internal audio player and the texture will be deleted.
"""
if self._source:
self.source.is_player_source = False
if self._audio_player:
self._audio_player.delete()
self._audio_player = None
Expand Down

0 comments on commit d8edc4c

Please sign in to comment.