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.
This commit is contained in:
Thomas A 2024-08-18 18:12:12 -07:00
parent 9655d5598c
commit 0bcc581554

View File

@ -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()