Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions av/codec/hwaccel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -69,7 +69,7 @@ def __repr__(self):
f"<av.{self.__class__.__name__} "
f"device_type={lib.av_hwdevice_get_type_name(self.device_type)} "
f"format={self.format.name if self.format else None} "
f"is_supported={self.is_supported} at 0x{cython.cast(int, self.ptr):x}>"
f"is_supported={self.is_supported} at 0x{cython.cast(cython.Py_ssize_t, self.ptr):x}>"
)

@property
Expand Down
Loading