* update chromaprint to 1.5.1-8
This commit is contained in:
parent
cda0cf988c
commit
83456164df
@ -5,7 +5,7 @@
|
||||
|
||||
pkgname=chromaprint
|
||||
pkgver=1.5.1
|
||||
pkgrel=7
|
||||
pkgrel=8
|
||||
pkgdesc="Library for extracting fingerprints from any audio source"
|
||||
url="https://acoustid.org/chromaprint"
|
||||
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
|
||||
@ -16,18 +16,22 @@ provides=('libchromaprint.so')
|
||||
# upstream signs with DSA key: https://github.com/acoustid/chromaprint/issues/81
|
||||
source=(https://github.com/acoustid/${pkgname}/archive/v$pkgver/$pkgname-$pkgver.tar.gz
|
||||
8ccad693.patch
|
||||
https://github.com/acoustid/chromaprint/commit/aa67c95b.patch)
|
||||
https://github.com/acoustid/chromaprint/commit/aa67c95b.patch
|
||||
ffmpeg-7.patch)
|
||||
sha512sums=('ea16e4d2b879c15b1d9b9ec93878da8b893f1834c70942663e1d2d106c2e0a661094fe2dd3bae7a6c2a1f9d5d8fab5e0b0ba493561090cf57b2228606fad1e66'
|
||||
'9eb62b6b165fb2a48fe6399025a51161347cb56b8b7d28819a90be38425d145d2997aecb203dbadf40bcb469b0757ad8f836dca7dbb1db95f923a427f3c2d9ee'
|
||||
'92a9491fe1cd4cedae4f36335de961f87c5ebba642ab52866011c43f34862c194afa9d25e5e54e5abc80112d69c39cc04c2ddd2a7a2fe799b35a3846c0d1e172')
|
||||
'92a9491fe1cd4cedae4f36335de961f87c5ebba642ab52866011c43f34862c194afa9d25e5e54e5abc80112d69c39cc04c2ddd2a7a2fe799b35a3846c0d1e172'
|
||||
'c99ea577ff5a5020574237769e817046aa09ca09848be6e5dacf204a8f8e26c0e104a96e9b3cb33289d19cdbf4b4d7d3575b2d00196bf2637d9dc313fe10b631')
|
||||
b2sums=('9f7f030e97d3114cf679df298d313ea826c0fb05e7e7d8a10090d0a27ed0811b380b81b29fce973e0493826c478964367396311fd0484619cb2fc4c2d8e0d4c0'
|
||||
'085dd1c64347a76cf912d327d8782fafd392777aae9dd565b1e84860e12a1262d9b25f908c54b96147abf74c82824529c6e100f5943ddff725358bb7aa19da47'
|
||||
'e49352aef51ef19874d51dabf5ecc5f703d7e441f34b37c8cef538395688a0c42a57bb0b75dc5af2140f2ab752ef7421635c29c45d5c3708789561b3a552b84c')
|
||||
'e49352aef51ef19874d51dabf5ecc5f703d7e441f34b37c8cef538395688a0c42a57bb0b75dc5af2140f2ab752ef7421635c29c45d5c3708789561b3a552b84c'
|
||||
'18f85611ea0a4205e499a92931960666ab871c07c0d67eb9377fb2279353e4e8caef6d4075863d1fee9e87765b9adc4147ec2cc8b477eaf939fc2d6864b9048b')
|
||||
|
||||
prepare() {
|
||||
patch -d $pkgname-$pkgver -p1 < 8ccad693.patch
|
||||
patch -d $pkgname-$pkgver -p1 < aa67c95b.patch # Port to ffmpeg 5
|
||||
sed -e '/CMAKE_CXX_STANDARD/d' -i $pkgname-$pkgver/CMakeLists.txt # Don't enforce c++11
|
||||
patch -d $pkgname-$pkgver -p1 < ffmpeg-7.patch # Fix tests with ffmpeg 7
|
||||
}
|
||||
|
||||
build() {
|
||||
|
20
chromaprint/ffmpeg-7.patch
Normal file
20
chromaprint/ffmpeg-7.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff --git a/src/audio/ffmpeg_audio_reader.h b/src/audio/ffmpeg_audio_reader.h
|
||||
index 35b2934..0b032e5 100644
|
||||
--- a/src/audio/ffmpeg_audio_reader.h
|
||||
+++ b/src/audio/ffmpeg_audio_reader.h
|
||||
@@ -118,8 +118,13 @@ inline bool FFmpegAudioReader::SetInputSampleRate(int sample_rate) {
|
||||
|
||||
inline bool FFmpegAudioReader::SetInputChannels(int channels) {
|
||||
char buf[64];
|
||||
- sprintf(buf, "%d", channels);
|
||||
- return av_dict_set(&m_input_opts, "channels", buf, 0) >= 0;
|
||||
+ if (channels == 1)
|
||||
+ sprintf(buf, "%s", "mono");
|
||||
+ else if (channels == 2)
|
||||
+ sprintf(buf, "%s", "stereo");
|
||||
+ else
|
||||
+ return false;
|
||||
+ return av_dict_set(&m_input_opts, "ch_layout", buf, 0) >= 0;
|
||||
}
|
||||
|
||||
inline bool FFmpegAudioReader::Open(const std::string &file_name) {
|
Loading…
x
Reference in New Issue
Block a user