Skip to content

Commit 3500838

Browse files
committed
Reference must be on device
1 parent 206d1f4 commit 3500838

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/decoders/test_video_decoder.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,9 @@ def test_get_frame_played_at_h265(self, device):
448448
# Non-regression test for https://github.com/pytorch/torchcodec/issues/179
449449
decoder = VideoDecoder(H265_VIDEO.path, device=device)
450450
ref_frame6 = H265_VIDEO.get_frame_data_by_index(5)
451-
assert_frames_equal(ref_frame6, decoder.get_frame_played_at(0.5).data)
451+
assert_frames_equal(
452+
ref_frame6.to(device=device), decoder.get_frame_played_at(0.5).data
453+
)
452454

453455
@pytest.mark.parametrize("device", cpu_and_cuda())
454456
def test_get_frame_played_at_fails(self, device):

0 commit comments

Comments
 (0)