Skip to content

Commit 07287d5

Browse files
committed
const cast
1 parent d5b4ec8 commit 07287d5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/torchcodec/decoders/_core/VideoDecoder.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,7 @@ UniqueAVFrame VideoDecoder::convertAudioAVFrameSampleFormat(
14301430
streamInfo.swrContext.get(),
14311431
convertedAVFrame->data,
14321432
convertedAVFrame->nb_samples,
1433-
(const uint8_t**)(avFrame->data),
1433+
static_cast<const uint8_t**>(const_cast<const uint8_t**>(avFrame->data)),
14341434
avFrame->nb_samples);
14351435
TORCH_CHECK(
14361436
numSampleConverted > 0,
@@ -1678,7 +1678,6 @@ void VideoDecoder::createSwrContext(
16781678
int sampleRate,
16791679
AVSampleFormat sourceSampleFormat,
16801680
AVSampleFormat desiredSampleFormat) {
1681-
16821681
auto swrContext = allocateSwrContext(
16831682
streamInfo.codecContext,
16841683
sampleRate,

0 commit comments

Comments
 (0)