Skip to content

Commit

Permalink
when the sound process stops and fires the callback, make sure it is …
Browse files Browse the repository at this point in the history
…the current one before telling the server to stop (and avoid killing the new one if this is because of an overrun restart)

git-svn-id: https://xpra.org/svn/Xpra/trunk@8955 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 7, 2015
1 parent 600f24c commit 32ea33a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/xpra/client/ui_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1644,8 +1644,10 @@ def sound_sink_error(self, sound_sink, error):
soundlog.warn("stopping speaker because of error: %s", error)
self.stop_receiving_sound()
def sound_process_stopped(self, sound_sink, *args):
soundlog("the sound sink process has stopped (%s)", args)
self.stop_receiving_sound()
soundlog("the sound sink process %s has stopped, current sound sink=%s", sound_sink, self.sound_sink)
if not self.sink_restart_pending and sound_sink==self.sound_sink:
soundlog.warn("the sound process has stopped")
self.stop_receiving_sound()

def sound_sink_overrun(self, *args):
if self.sink_restart_pending:
Expand All @@ -1659,11 +1661,11 @@ def sound_sink_overrun(self, *args):
#Note: the next sound packet will take care of starting a new pipeline
self.stop_receiving_sound()
def restart():
self.sink_restart_pending = False
soundlog("restart() sound_sink=%s, codec=%s, server_sound_sequence=%s", self.sound_sink, codec, self.server_sound_sequence)
if self.server_sound_sequence:
self.send_new_sound_sequence()
self.start_receiving_sound()
self.sink_restart_pending = False
return False
self.timeout_add(200, restart)

Expand Down

0 comments on commit 32ea33a

Please sign in to comment.