Skip to content

Commit

Permalink
execute player stop directive only when player is in playing or pause…
Browse files Browse the repository at this point in the history
…d status
  • Loading branch information
xiongyihui committed May 23, 2018
1 parent d96e510 commit 9d676f8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions avs/interface/audio_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,11 @@ def PlaybackFailed(self):
# }
# }
def Stop(self, directive):
self.player.stop()
self.PlaybackStopped()
if self.state == 'PLAYING' or self.state == 'PAUSED':
self.player.stop()
self.PlaybackStopped()

logger.info('audio player is stoped')
logger.info('audio player is stoped')

def PlaybackStopped(self):
self.state = 'STOPPED'
Expand Down

0 comments on commit 9d676f8

Please sign in to comment.