Merge branch 'v0.23.x'

This commit is contained in:
Max Kellermann
2022-07-27 11:06:47 +02:00
6 changed files with 46 additions and 16 deletions

View File

@@ -37,7 +37,11 @@ InterleaveFrame(const AVFrame &frame, FfmpegBuffer &buffer)
assert(frame.nb_samples > 0);
const auto format = AVSampleFormat(frame.format);
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(57, 25, 100)
const unsigned channels = frame.ch_layout.nb_channels;
#else
const unsigned channels = frame.channels;
#endif
const std::size_t n_frames = frame.nb_samples;
int plane_size;

View File

@@ -18,17 +18,25 @@ if icu_dep.found()
'Util.cxx',
'Init.cxx',
]
elif not get_option('iconv').disabled()
# an installed iconv library will make the builtin iconv() unavailable,
# so search for the library first and pass it as (possible) dependency
iconv_dep = compiler.find_library('libiconv', required: false)
have_iconv = compiler.has_function('iconv',
dependencies: iconv_dep,
prefix : '#include <iconv.h>')
if not have_iconv and get_option('iconv').enabled()
error('iconv() not available')
else
if meson.version().version_compare('>= 0.60')
iconv_dep = dependency('iconv', required: get_option('iconv'))
conf.set('HAVE_ICONV', iconv_dep.found())
elif not get_option('iconv').disabled()
iconv_open_snippet = '''#include <iconv.h>
int main() {
iconv_open("","");
}'''
have_iconv = compiler.links(iconv_open_snippet, name: 'iconv_open')
if not have_iconv
iconv_dep = compiler.find_library('iconv', required: false)
have_iconv = compiler.links(iconv_open_snippet, dependencies: iconv_dep, name: 'iconv_open')
endif
if not have_iconv and get_option('iconv').enabled()
error('iconv() not available')
endif
conf.set('HAVE_ICONV', have_iconv)
endif
conf.set('HAVE_ICONV', have_iconv)
endif
icu = static_library(