Skip to content

Commit

Permalink
simplify the code we can shortcut earlier if there is no source
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@8970 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 8, 2015
1 parent ea3decf commit 0996d51
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/xpra/client/ui_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1730,14 +1730,13 @@ def _process_sound_data(self, packet):
soundlog("speaker is now disabled - dropping packet")
return
ss = self.sound_sink
if metadata.boolget("end-of-stream"):
if ss:
soundlog("server sent end-of-stream for sequence %s, closing sound pipeline", seq)
self.stop_receiving_sound(False)
return
if ss is None:
soundlog("no sound sink to process sound data, dropping it")
return
if metadata.boolget("end-of-stream"):
soundlog("server sent end-of-stream for sequence %s, closing sound pipeline", seq)
self.stop_receiving_sound(False)
return
if codec!=ss.codec:
log.error("sound codec change not supported! (from %s to %s)", ss.codec, codec)
ss.stop()
Expand Down

0 comments on commit 0996d51

Please sign in to comment.