xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Ticket #947: cython023-nvenc4-nofinally.patch

File cython023-nvenc4-nofinally.patch, 1.6 KB (added by Antoine Martin, 6 years ago)

this "fixes" compilation of the module by not using the problematic finally block

  • xpra/codecs/nvenc4/encoder.pyx

     
    20222022            self.bytes_out += size
    20232023            data = (<char *> lockOutputBuffer.bitstreamBufferPtr)[:size]
    20242024        finally:
    2025             if DEBUG_API:
    2026                 log("nvEncUnlockBitstream(%#x)", <unsigned long> self.bitstreamBuffer)
    2027             with nogil:
    2028                 r = self.functionList.nvEncUnlockBitstream(self.context, self.bitstreamBuffer)
    2029             raiseNVENC(r, "unlocking output buffer")
    2030             if DEBUG_API:
    2031                 log("nvEncUnmapInputResource(%#x)", <unsigned long> self.bitstreamBuffer)
    2032             with nogil:
    2033                 r = self.functionList.nvEncUnmapInputResource(self.context, mapInputResource.mappedResource)
    2034             raiseNVENC(r, "unmapping input resource")
     2025            pass
     2026        if DEBUG_API:
     2027            log("nvEncUnlockBitstream(%#x)", <unsigned long> self.bitstreamBuffer)
     2028        with nogil:
     2029            r = self.functionList.nvEncUnlockBitstream(self.context, self.bitstreamBuffer)
     2030        raiseNVENC(r, "unlocking output buffer")
     2031        if DEBUG_API:
     2032            log("nvEncUnmapInputResource(%#x)", <unsigned long> self.bitstreamBuffer)
     2033        with nogil:
     2034            r = self.functionList.nvEncUnmapInputResource(self.context, mapInputResource.mappedResource)
     2035        raiseNVENC(r, "unmapping input resource")
    20352036
    20362037        download_end = time.time()
    20372038        log("compress_image(..) download took %.1f ms", (download_end-encode_end)*1000.0)