Skip to content

Commit

Permalink
Pointers are pointes
Browse files Browse the repository at this point in the history
  • Loading branch information
scotts committed Jan 16, 2025
1 parent a4df539 commit fef1ea0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/torchcodec/decoders/_core/CudaDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,15 @@ std::optional<const AVCodec*> findCudaCodec(
void* i = nullptr;
const AVCodec** codec = nullptr;
while ((*codec = av_codec_iterate(&i)) != nullptr) {
if (codec->id != codecId || !av_codec_is_decoder(codec)) {
if (*codec->id != codecId || !av_codec_is_decoder(*codec)) {
continue;
}

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

0 comments on commit fef1ea0

Please sign in to comment.