Skip to content

Commit

Permalink
Always Call av_probe_input_format
Browse files Browse the repository at this point in the history
Fortunately, the FFmpeg package in Ubuntu 20.04 also has the `av_probe_input_format` method. Therefore, we can remove the old code.
  • Loading branch information
CuriousTommy committed Aug 19, 2024
1 parent 9655d55 commit 0bcc581
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/CoreAudio/AFAVFormatComponent/AudioFileFormatGeneric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,7 @@ UncertainResult AudioFileFormatGeneric::FileDataIsThisFormat(UInt32 inDataByteSi
probeData.buf = buf.data();
probeData.buf_size = inDataByteSize;

#warning "TODO: Remove old `read_probe` call once we no longer support older distros"
#if LIBAVCODEC_VERSION_MAJOR >= 61
return av_probe_input_format(&probeData, false) != nullptr ? kTrue : kFalse;
#else
const AVInputFormat* fmt = av_find_input_format(m_avformatShortName);
if (!fmt)
return false;
return fmt->read_probe(&probeData) ? kTrue : kFalse;
#endif
}

AudioFileObject* AudioFileFormatGeneric::New()
Expand Down

0 comments on commit 0bcc581

Please sign in to comment.