File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
src/torchcodec/decoders/_core Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff 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_;
Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments