Skip to content

Commit 374b44a

Browse files
authored
Removed unused variables. (#437)
1 parent 04af57f commit 374b44a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/torchcodec/decoders/_core/VideoDecoder.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,15 +1414,11 @@ int VideoDecoder::convertFrameToTensorUsingSwsScale(
14141414
int streamIndex,
14151415
const AVFrame* frame,
14161416
torch::Tensor& outputTensor) {
1417-
enum AVPixelFormat frameFormat =
1418-
static_cast<enum AVPixelFormat>(frame->format);
14191417
StreamInfo& activeStream = streams_[streamIndex];
1420-
1421-
int expectedOutputHeight = outputTensor.sizes()[0];
1422-
int expectedOutputWidth = outputTensor.sizes()[1];
14231418
SwsContext* swsContext = activeStream.swsContext.get();
14241419
uint8_t* pointers[4] = {
14251420
outputTensor.data_ptr<uint8_t>(), nullptr, nullptr, nullptr};
1421+
int expectedOutputWidth = outputTensor.sizes()[1];
14261422
int linesizes[4] = {expectedOutputWidth * 3, 0, 0, 0};
14271423
int resultHeight = sws_scale(
14281424
swsContext,

0 commit comments

Comments
 (0)