Unverified Commit 315f3152 authored by Nicolas Hug's avatar Nicolas Hug Committed by GitHub
Browse files

[FBcode->GH] [codemod][highrisk] Fix shadowed variable in...


[FBcode->GH] [codemod][highrisk] Fix shadowed variable in pytorch/vision/torchvision/csrc/io/decoder/decoder.cpp (#8217)
Co-authored-by: default avatarRichard Barnes <rbarnes@meta.com>
parent 6f0deb9b
...@@ -420,20 +420,20 @@ bool Decoder::openStreams(std::vector<DecoderMetadata>* metadata) { ...@@ -420,20 +420,20 @@ bool Decoder::openStreams(std::vector<DecoderMetadata>* metadata) {
if (it->stream == -2 || // all streams of this type are welcome if (it->stream == -2 || // all streams of this type are welcome
(!stream && (it->stream == -1 || it->stream == i))) { // new stream (!stream && (it->stream == -1 || it->stream == i))) { // new stream
VLOG(1) << "Stream type: " << format.type << " found, at index: " << i; VLOG(1) << "Stream type: " << format.type << " found, at index: " << i;
auto stream = createStream( auto stream_2 = createStream(
format.type, format.type,
inputCtx_, inputCtx_,
i, i,
params_.convertPtsToWallTime, params_.convertPtsToWallTime,
it->format, it->format,
params_.loggingUuid); params_.loggingUuid);
CHECK(stream); CHECK(stream_2);
if (stream->openCodec(metadata, params_.numThreads) < 0) { if (stream_2->openCodec(metadata, params_.numThreads) < 0) {
LOG(ERROR) << "uuid=" << params_.loggingUuid LOG(ERROR) << "uuid=" << params_.loggingUuid
<< " open codec failed, stream_idx=" << i; << " open codec failed, stream_idx=" << i;
return false; return false;
} }
streams_.emplace(i, std::move(stream)); streams_.emplace(i, std::move(stream_2));
inRange_.set(i, true); inRange_.set(i, true);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment