decoder/ffmpeg: require FFmpeg 4.0 or later
This commit is contained in:
@@ -59,13 +59,8 @@ public:
|
||||
}
|
||||
|
||||
size_t Read(void *buffer, size_t size) {
|
||||
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 81, 100)
|
||||
int result = avio_read_partial(io_context,
|
||||
(unsigned char *)buffer, size);
|
||||
#else
|
||||
int result = avio_read(io_context,
|
||||
(unsigned char *)buffer, size);
|
||||
#endif
|
||||
if (result < 0)
|
||||
throw MakeFfmpegError(result, "avio_read() failed");
|
||||
|
||||
|
||||
@@ -8,16 +8,11 @@
|
||||
#include "LogCallback.hxx"
|
||||
|
||||
extern "C" {
|
||||
#include <libavformat/avformat.h>
|
||||
#include <libavutil/log.h>
|
||||
}
|
||||
|
||||
void
|
||||
FfmpegInit()
|
||||
{
|
||||
av_log_set_callback(FfmpegLogCallback);
|
||||
|
||||
#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 9, 100)
|
||||
/* deprecated as of FFmpeg 4.0 */
|
||||
av_register_all();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
libavformat_dep = dependency('libavformat', version: '>= 57.40', required: get_option('ffmpeg'))
|
||||
libavcodec_dep = dependency('libavcodec', version: '>= 57.48', required: get_option('ffmpeg'))
|
||||
libavutil_dep = dependency('libavutil', version: '>= 55.27', required: get_option('ffmpeg'))
|
||||
libavformat_dep = dependency('libavformat', version: '>= 58.12', required: get_option('ffmpeg'))
|
||||
libavcodec_dep = dependency('libavcodec', version: '>= 58.18', required: get_option('ffmpeg'))
|
||||
libavutil_dep = dependency('libavutil', version: '>= 56.14', required: get_option('ffmpeg'))
|
||||
conf.set('HAVE_LIBAVUTIL', libavutil_dep.found())
|
||||
|
||||
enable_ffmpeg = libavformat_dep.found() and libavcodec_dep.found() and libavutil_dep.found()
|
||||
|
||||
Reference in New Issue
Block a user