From 0bcc5815548463929c2b1619ca8bfbbd8d1df5c6 Mon Sep 17 00:00:00 2001 From: Thomas A Date: Sun, 18 Aug 2024 18:12:12 -0700 Subject: [PATCH] Always Call `av_probe_input_format` Fortunately, the FFmpeg package in Ubuntu 20.04 also has the `av_probe_input_format` method. Therefore, we can remove the old code. --- .../AFAVFormatComponent/AudioFileFormatGeneric.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/CoreAudio/AFAVFormatComponent/AudioFileFormatGeneric.cpp b/src/CoreAudio/AFAVFormatComponent/AudioFileFormatGeneric.cpp index 2ea19f686..8dee3696e 100644 --- a/src/CoreAudio/AFAVFormatComponent/AudioFileFormatGeneric.cpp +++ b/src/CoreAudio/AFAVFormatComponent/AudioFileFormatGeneric.cpp @@ -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()