diff --git a/xpra/codecs/openh264/decoder.pyx b/xpra/codecs/openh264/decoder.pyx index 9a8c7bad72..838083c612 100644 --- a/xpra/codecs/openh264/decoder.pyx +++ b/xpra/codecs/openh264/decoder.pyx @@ -190,9 +190,12 @@ cdef class Decoder: strides = [ystride, uvstride, uvstride] cdef int width = buf_info.UsrData.sSystemBuffer.iWidth cdef int height = buf_info.UsrData.sSystemBuffer.iHeight - if abs(width-self.width) > 1 or abs(height-self.height) > 1: - log.warn("Warning: image bigger than expected") - log.warn(f" {width}x{height} instead of {self.width}x{self.height}") + cdef int wdelta = width - self.width + cdef int hdelta = height - self.height + if abs(wdelta) > 1 or abs(hdelta) > 1: + if (wdelta & 0xffe0) > 0 or (hdelta & 0xfffe0) > 0: + log.warn("Warning: image bigger than expected") + log.warn(f" {width}x{height} instead of {self.width}x{self.height}") pixels = [ yuv[0][:ystride*height], yuv[1][:uvstride*(height//2)],