Skip to content

Commit 3a20278

Browse files
committed
Remove redundant/unused lines
1 parent a146710 commit 3a20278

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

av/video/frame.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
PyCapsule_IsValid,
1616
PyCapsule_SetName,
1717
)
18-
from cython.cimports.cpython.ref import Py_DECREF, Py_INCREF, PyObject
18+
from cython.cimports.cpython.ref import Py_DECREF, Py_INCREF
1919
from cython.cimports.dlpack import DLManagedTensor, kDLCPU, kDLCUDA, kDLUInt
2020
from cython.cimports.libc.stdint import int64_t, uint8_t
2121

@@ -1412,8 +1412,6 @@ def from_dlpack(
14121412
if dev0 != dev1:
14131413
raise ValueError("plane tensors must be on the same CUDA device")
14141414
if dev_type0 == kDLCUDA:
1415-
if dev0 != dev1:
1416-
raise ValueError("plane tensors must be on the same CUDA device")
14171415
if device_id is None:
14181416
device_id = dev0
14191417
elif device_id != dev0:
@@ -1509,8 +1507,6 @@ def from_dlpack(
15091507
frame.ptr.width = width
15101508
frame.ptr.height = height
15111509
if dev_type0 == kDLCUDA:
1512-
if primary_ctx is None:
1513-
primary_ctx = True
15141510
if not isinstance(primary_ctx, (bool, int)):
15151511
raise TypeError("primary_ctx must be a bool")
15161512
primary_ctx = bool(primary_ctx)

0 commit comments

Comments
 (0)