Skip to content

Commit

Permalink
#4201 use the same options for all encoding functions
Browse files Browse the repository at this point in the history
cloning the options later meant that may_use_scrolling tagged the image with the boolean 'scroll' to indicate the scroll detection had already been used,
but the flag was later lost and scroll detection would run again in some cases, comparing the current image with itself..
  • Loading branch information
totaam committed Jul 30, 2024
1 parent 764bb5e commit a358f22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xpra/server/window/compress.py
Original file line number Diff line number Diff line change
Expand Up @@ -2646,7 +2646,8 @@ def nodata(msg, *args) -> None:
if self.suspended:
return nodata("suspended")
start = monotonic()
if SCROLL_ALL and self.may_use_scrolling(image, options):
tdoptions = typedict(options)
if SCROLL_ALL and self.may_use_scrolling(image, tdoptions):
return nodata("used scrolling instead")
end = monotonic()
log("scroll detection took %ims", 1000*(end-start))
Expand All @@ -2671,7 +2672,6 @@ def nodata(msg, *args) -> None:
if self.is_cancelled(sequence):
return nodata("cancelled")
raise RuntimeError(f"BUG: no encoder found for {coding!r} with options={options}")
tdoptions = typedict(options)
try:
ret = encoder(coding, image, tdoptions)
except (TypeError, RuntimeError) as e:
Expand Down

0 comments on commit a358f22

Please sign in to comment.