Skip to content

Commit

Permalink
Removed unused variables. (#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
scotts authored Dec 17, 2024
1 parent 04af57f commit 374b44a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/torchcodec/decoders/_core/VideoDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1414,15 +1414,11 @@ int VideoDecoder::convertFrameToTensorUsingSwsScale(
int streamIndex,
const AVFrame* frame,
torch::Tensor& outputTensor) {
enum AVPixelFormat frameFormat =
static_cast<enum AVPixelFormat>(frame->format);
StreamInfo& activeStream = streams_[streamIndex];

int expectedOutputHeight = outputTensor.sizes()[0];
int expectedOutputWidth = outputTensor.sizes()[1];
SwsContext* swsContext = activeStream.swsContext.get();
uint8_t* pointers[4] = {
outputTensor.data_ptr<uint8_t>(), nullptr, nullptr, nullptr};
int expectedOutputWidth = outputTensor.sizes()[1];
int linesizes[4] = {expectedOutputWidth * 3, 0, 0, 0};
int resultHeight = sws_scale(
swsContext,
Expand Down

0 comments on commit 374b44a

Please sign in to comment.