Skip to content

Commit 3485205

Browse files
committed
Merge branch 'main' of github.com:pytorch/torchcodec into refactor_seek
2 parents 2ea149d + 41c6491 commit 3485205

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/torchcodec/decoders/_core/VideoDecoder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ class VideoDecoder {
378378
std::set<int> activeStreamIndices_;
379379
// True when the user wants to seek. The actual pts values to seek to are
380380
// stored in the per-stream metadata in discardFramesBeforePts.
381-
bool hasDesiredPts_;
381+
bool hasDesiredPts_ = false;
382382

383383
// Stores various internal decoding stats.
384384
DecodeStats decodeStats_;

src/torchcodec/decoders/_core/VideoDecoderOps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ void _add_video_stream(
168168
if (device.has_value()) {
169169
if (device.value() == "cpu") {
170170
options.device = torch::Device(torch::kCPU);
171-
} else if (device.value().starts_with("cuda")) {
171+
} else if (device.value().rfind("cuda", 0) == 0) { // starts with "cuda"
172172
std::string deviceStr(device.value());
173173
options.device = torch::Device(deviceStr);
174174
} else {

0 commit comments

Comments
 (0)