mirror of
https://github.com/darlinghq/darling.git
synced 2024-11-26 22:00:29 +00:00
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:
parent
9655d5598c
commit
0bcc581554
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user