Skip to content

Commit b45decc

Browse files
committed
Fixes
1 parent 78ab058 commit b45decc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/torchcodec/decoders/_video_decoder.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,12 @@ def __init__(
146146
# TODONVDEC P2 Consider alternative ways of exposing custom device
147147
# variants, and if we want this new decoder backend to be a "device
148148
# variant" at all.
149-
device_split = device.split(":")
150-
if len(device_split) == 3:
151-
device_variant = device_split[2]
152-
device = ":".join(device_split[0:2])
153-
else:
154-
device_variant = "default"
149+
device_variant = "default"
150+
if device is not None:
151+
device_split = device.split(":")
152+
if len(device_split) == 3:
153+
device_variant = device_split[2]
154+
device = ":".join(device_split[0:2])
155155

156156
# TODONVDEC P0 Support approximate mode. Not ideal to validate that here
157157
# either, but validating this at a lower level forces to add yet another

test/resources/testsrc2.mp4

664 KB
Binary file not shown.

0 commit comments

Comments
 (0)