From 315f31527e720999eecbb986679b3177d4ed5e37 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Mon, 22 Jan 2024 14:23:04 +0000 Subject: [PATCH] [FBcode->GH] [codemod][highrisk] Fix shadowed variable in pytorch/vision/torchvision/csrc/io/decoder/decoder.cpp (#8217) Co-authored-by: Richard Barnes --- torchvision/csrc/io/decoder/decoder.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/torchvision/csrc/io/decoder/decoder.cpp b/torchvision/csrc/io/decoder/decoder.cpp index a895eed2d39..e95e4a3aea5 100644 --- a/torchvision/csrc/io/decoder/decoder.cpp +++ b/torchvision/csrc/io/decoder/decoder.cpp @@ -420,20 +420,20 @@ bool Decoder::openStreams(std::vector* metadata) { if (it->stream == -2 || // all streams of this type are welcome (!stream && (it->stream == -1 || it->stream == i))) { // new stream VLOG(1) << "Stream type: " << format.type << " found, at index: " << i; - auto stream = createStream( + auto stream_2 = createStream( format.type, inputCtx_, i, params_.convertPtsToWallTime, it->format, params_.loggingUuid); - CHECK(stream); - if (stream->openCodec(metadata, params_.numThreads) < 0) { + CHECK(stream_2); + if (stream_2->openCodec(metadata, params_.numThreads) < 0) { LOG(ERROR) << "uuid=" << params_.loggingUuid << " open codec failed, stream_idx=" << i; return false; } - streams_.emplace(i, std::move(stream)); + streams_.emplace(i, std::move(stream_2)); inRange_.set(i, true); } }