Skip to content

Commit 304da2e

Browse files
authored
Added static cast to resolve lint (#1157)
1 parent 2b43b2a commit 304da2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/torchcodec/_core/CpuDeviceInterface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ int CpuDeviceInterface::convertAVFrameToTensorUsingSwScale(
299299

300300
uint8_t* colorConvertedPointers[4] = {
301301
colorConvertedTensor.data_ptr<uint8_t>(), nullptr, nullptr, nullptr};
302-
int colorConvertedWidth = colorConvertedTensor.sizes()[1];
302+
int colorConvertedWidth = static_cast<int>(colorConvertedTensor.sizes()[1]);
303303
int colorConvertedLinesizes[4] = {colorConvertedWidth * 3, 0, 0, 0};
304304

305305
int colorConvertedHeight = sws_scale(
@@ -344,7 +344,7 @@ int CpuDeviceInterface::convertAVFrameToTensorUsingSwScale(
344344

345345
uint8_t* dstPointers[4] = {
346346
outputTensor.data_ptr<uint8_t>(), nullptr, nullptr, nullptr};
347-
int expectedOutputWidth = outputTensor.sizes()[1];
347+
int expectedOutputWidth = static_cast<int>(outputTensor.sizes()[1]);
348348
int dstLinesizes[4] = {expectedOutputWidth * 3, 0, 0, 0};
349349

350350
colorConvertedHeight = sws_scale(

0 commit comments

Comments
 (0)