From d28fc1e43c4297bc160824360d4f7e874718bde0 Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Tue, 5 Nov 2024 06:10:12 -0800 Subject: [PATCH] [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 --- src/torchcodec/decoders/_core/VideoDecoder.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/torchcodec/decoders/_core/VideoDecoder.cpp b/src/torchcodec/decoders/_core/VideoDecoder.cpp index b20a5e547..4867c90a7 100644 --- a/src/torchcodec/decoders/_core/VideoDecoder.cpp +++ b/src/torchcodec/decoders/_core/VideoDecoder.cpp @@ -835,10 +835,6 @@ VideoDecoder::RawDecodedOutput VideoDecoder::getDecodedOutputWithFilter( StreamInfo& activeStream = streams_[frameStreamIndex]; activeStream.currentPts = frame->pts; activeStream.currentDuration = getDuration(frame); - auto startToSeekDone = - std::chrono::duration_cast(seekDone - start); - auto seekToDecodeDone = std::chrono::duration_cast( - decodeDone - seekDone); RawDecodedOutput rawOutput; rawOutput.streamIndex = frameStreamIndex; rawOutput.frame = std::move(frame); @@ -1390,7 +1386,6 @@ torch::Tensor VideoDecoder::convertFrameToTensorUsingFilterGraph( }; torch::Tensor tensor = torch::from_blob( filteredFramePtr->data[0], shape, strides, deleter, {torch::kUInt8}); - StreamInfo& activeStream = streams_[streamIndex]; return tensor; }