diff --git a/av/codec/hwaccel.py b/av/codec/hwaccel.py index 991848995..96175ff15 100644 --- a/av/codec/hwaccel.py +++ b/av/codec/hwaccel.py @@ -45,12 +45,12 @@ class HWConfigMethod(IntEnum): @cython.cfunc def wrap_hwconfig(ptr: cython.pointer[lib.AVCodecHWConfig]) -> HWConfig: try: - return _singletons[cython.cast(cython.int, ptr)] + return _singletons[cython.cast(cython.Py_ssize_t, ptr)] except KeyError: pass config: HWConfig = HWConfig(_cinit_sentinel) config._init(ptr) - _singletons[cython.cast(cython.int, ptr)] = config + _singletons[cython.cast(cython.Py_ssize_t, ptr)] = config return config @@ -69,7 +69,7 @@ def __repr__(self): f"" + f"is_supported={self.is_supported} at 0x{cython.cast(cython.Py_ssize_t, self.ptr):x}>" ) @property