Skip to content

Commit

Permalink
Remove const?
Browse files Browse the repository at this point in the history
  • Loading branch information
scotts committed Jan 16, 2025
1 parent 36f6321 commit 4883b03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/torchcodec/decoders/_core/CudaDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,13 @@ std::optional<const AVCodec*> findCudaCodec(
throwErrorIfNonCudaDevice(device);

void* i = nullptr;
while (const AVCodec* codec = av_codec_iterate(&i)) {
while ((AVCodec* codec = av_codec_iterate(&i)) != nullptr) {
if (codec->id != codecId || !av_codec_is_decoder(codec)) {
continue;
}

for (int j = 0;
(const AVCodecHWConfig* config = avcodec_get_hw_config(codec, j));
(AVCodecHWConfig* config = avcodec_get_hw_config(codec, j)) != nullptr;
j++) {
if (config->device_type == AV_HWDEVICE_TYPE_CUDA) {
return codec;
Expand Down

0 comments on commit 4883b03

Please sign in to comment.