Skip to content

Commit d28fc1e

Browse files
r-barnesfacebook-github-bot
authored andcommitted
[codemod] Remove unused-variable in /fbcode/pytorch/torchcodec/src/torchcodec/decoders/_core/VideoDecoder.cpp
Summary: [codemod] Remove unused-variable in {filename} LLVM-15 has a warning `-Wunused-variable` which we treat as an error because it's so often diagnostic of a code issue. Unused variables can compromise readability or, worse, performance. This diff either (a) removes an unused variable and, possibly, it's associated code or (b) qualifies the variable with `[[maybe_unused]]`. #buildsonlynotests - Builds are sufficient to verify - If you approve of this diff, please use the "Accept & Ship" button :-) Reviewed By: scotts Differential Revision: D65445691
1 parent ab79e67 commit d28fc1e

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/torchcodec/decoders/_core/VideoDecoder.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -835,10 +835,6 @@ VideoDecoder::RawDecodedOutput VideoDecoder::getDecodedOutputWithFilter(
835835
StreamInfo& activeStream = streams_[frameStreamIndex];
836836
activeStream.currentPts = frame->pts;
837837
activeStream.currentDuration = getDuration(frame);
838-
auto startToSeekDone =
839-
std::chrono::duration_cast<std::chrono::milliseconds>(seekDone - start);
840-
auto seekToDecodeDone = std::chrono::duration_cast<std::chrono::milliseconds>(
841-
decodeDone - seekDone);
842838
RawDecodedOutput rawOutput;
843839
rawOutput.streamIndex = frameStreamIndex;
844840
rawOutput.frame = std::move(frame);
@@ -1390,7 +1386,6 @@ torch::Tensor VideoDecoder::convertFrameToTensorUsingFilterGraph(
13901386
};
13911387
torch::Tensor tensor = torch::from_blob(
13921388
filteredFramePtr->data[0], shape, strides, deleter, {torch::kUInt8});
1393-
StreamInfo& activeStream = streams_[streamIndex];
13941389
return tensor;
13951390
}
13961391

0 commit comments

Comments
 (0)