Skip to content

Commit

Permalink
[FBcode->GH] [codemod][highrisk] Fix shadowed variable in pytorch/vis…
Browse files Browse the repository at this point in the history
…ion/torchvision/csrc/io/decoder/decoder.cpp (#8217)

Co-authored-by: Richard Barnes <rbarnes@meta.com>
  • Loading branch information
NicolasHug and r-barnes authored Jan 22, 2024
1 parent 6f0deb9 commit 315f315
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions torchvision/csrc/io/decoder/decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,20 +420,20 @@ bool Decoder::openStreams(std::vector<DecoderMetadata>* 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);
}
}
Expand Down

0 comments on commit 315f315

Please sign in to comment.