Skip to content

Commit c725334

Browse files
author
Molly Xu
committed
update comments
1 parent e30a119 commit c725334

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/torchcodec/decoders/_video_decoder.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ def __init__(
144144
if num_ffmpeg_threads is None:
145145
raise ValueError(f"{num_ffmpeg_threads = } should be an int.")
146146

147-
# Handle device=None by using the current default device
148147
if device is None:
149148
device = str(torch.get_default_device())
150149
elif isinstance(device, torch_device):

test/test_decoders.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,8 @@ def test_device_instance(self):
396396
],
397397
)
398398
def test_device_none_default_device(self, device_str):
399-
# device=None should respect both torch.device() context manager
400-
# and torch.set_default_device()
399+
# VideoDecoder defaults to device=None, which should respect both
400+
# torch.device() context manager and torch.set_default_device().
401401

402402
# Test with context manager
403403
with torch.device(device_str):

0 commit comments

Comments
 (0)