Skip to content

Commit

Permalink
when we cleanup the window source, we must free all items from the av…
Browse files Browse the repository at this point in the history
…-sync encode queue

git-svn-id: https://xpra.org/svn/Xpra/trunk@14308 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 28, 2016
1 parent ce84623 commit 06d7dca
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/xpra/server/window/window_video_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ def specinfo(x):

def cleanup(self):
WindowSource.cleanup(self)
self.free_encode_from_queue()
self.cleanup_codecs()

def cleanup_codecs(self):
Expand Down Expand Up @@ -791,6 +792,14 @@ def get_frame_encode_delay(self, options):
return 0
return self.av_sync_delay

def free_encode_from_queue(self):
#free all items in the encode queue:
eqt = self.encode_from_queue_timer
if eqt:
self.encode_from_queue_timer = None
self.source_remove(eqt)
self.call_in_encode_thread(False, self.encode_from_queue)

def schedule_encode_from_queue(self, av_delay):
#must be called from the UI thread for synchronization
#we ensure that the timer will fire no later than av_delay
Expand Down

0 comments on commit 06d7dca

Please sign in to comment.