Skip to content

Commit

Permalink
we have a meaningful method, use it instead of explicitly calling res…
Browse files Browse the repository at this point in the history
…tride

git-svn-id: https://xpra.org/svn/Xpra/trunk@19110 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 29, 2018
1 parent 2306334 commit 1739434
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/xpra/server/window/window_video_source.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# This file is part of Xpra.
# Copyright (C) 2013-2017 Antoine Martin <[email protected]>
# Copyright (C) 2013-2018 Antoine Martin <[email protected]>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.

Expand Down Expand Up @@ -782,10 +782,13 @@ def process_damage_region(self, damage_time, x, y, w, h, coding, options, flush=
#TODO: encode delay can be derived rather than hard-coded
encode_delay = 50
av_delay = max(0, av_delay - encode_delay)
must_freeze = av_delay>=0 or coding in self.video_encodings
#freeze if:
# * we want av-sync
# * the video encoder needs a thread safe image
# (the xshm backing may change from underneath us if we don't freeze it)
must_freeze = av_delay>0 or ((coding in self.video_encodings or coding=="auto") and not image.is_thread_safe())
if must_freeze:
newstride = roundup(image.get_width()*image.get_bytesperpixel(), 4)
image.restride(newstride)
image.freeze()
def call_encode(ew, eh, eimage, encoding, eflush):
self._sequence += 1
sequence = self._sequence
Expand Down

0 comments on commit 1739434

Please sign in to comment.