Skip to content

Commit

Permalink
another error callback that needs to run from the UI thread
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@2346 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Dec 25, 2012
1 parent b3e268d commit f6db194
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/xpra/gl/gl_window_backing.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,18 +149,18 @@ def do_video_paint(self, coding, img_data, x, y, width, height, options, callbac
log("do_video_paint: options=%s, decoder=%s", options, type(self._video_decoder))
err, rowstrides, img_data = self._video_decoder.decompress_image_to_yuv(img_data, options)
success = err==0 and img_data and len(img_data)==3
if not success:
log.error("do_video_paint: %s decompression error %s on %s bytes of picture data for %sx%s pixels, options=%s",
coding, err, len(img_data), width, height, options)
self.fire_paint_callbacks(callbacks, False)
return
csc_pixel_format = options.get("csc_pixel_format", -1)
pixel_format = self._video_decoder.get_pixel_format(csc_pixel_format)
def do_paint():
if not success:
log.error("do_video_paint: %s decompression error %s on %s bytes of picture data for %sx%s pixels, options=%s",
coding, err, len(img_data), width, height, options)
self.fire_paint_callbacks(callbacks, False)
return
if not self.drawable:
log("cannot paint, drawable is not set")
self.fire_paint_callbacks(callbacks, False)
return
csc_pixel_format = options.get("csc_pixel_format", -1)
pixel_format = self._video_decoder.get_pixel_format(csc_pixel_format)
try:
self.update_texture_yuv(img_data, x, y, width, height, rowstrides, pixel_format)
if self.paint_screen:
Expand Down

0 comments on commit f6db194

Please sign in to comment.