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
4 changes: 2 additions & 2 deletions av/video/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1661,7 +1661,7 @@ def from_dlpack(
"device_id does not match the DLPack tensor device_id"
)
else:
if device_id not in (None, 0):
if device_id is not None and device_id != 0:
raise ValueError("device_id must be 0 for CPU tensors")
device_id = 0
if dev_type0 == kCPU and (dev0 != 0 or dev1 != 0):
Expand Down Expand Up @@ -1886,7 +1886,7 @@ def _from_dlpack_planar(planes, sw_fmt, format, width, height, stream, device_id
)
expected_bits: cython.int = itemsize * 8

if device_id not in (None, 0):
if device_id is not None and device_id != 0:
raise ValueError("device_id must be 0 for CPU tensors")

log2_w: cython.int = desc.log2_chroma_w
Expand Down
Loading