diff options
author | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-01-02 08:11:55 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-01-02 08:12:46 +0700 |
commit | 9c5f47526eaef77727c6ff4eb53cdeb90c4e95b4 (patch) | |
tree | d096880c4979d44838ea48cba4006eab240e751f /audio/clementine/chromaprint-1.4.patch | |
parent | 76b0ee009152d608ae4a127e837d82b787fe5c29 (diff) |
audio/clementine: Fix build against chromaprint 1.4.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio/clementine/chromaprint-1.4.patch')
-rw-r--r-- | audio/clementine/chromaprint-1.4.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/audio/clementine/chromaprint-1.4.patch b/audio/clementine/chromaprint-1.4.patch new file mode 100644 index 0000000000000..3b833aa48ab82 --- /dev/null +++ b/audio/clementine/chromaprint-1.4.patch @@ -0,0 +1,30 @@ +--- Clementine-1.3.1/src/musicbrainz/chromaprinter.cpp.orig 2016-04-19 22:08:35.000000000 +0700 ++++ Clementine-1.3.1/src/musicbrainz/chromaprinter.cpp 2017-01-02 08:07:14.334983962 +0700 +@@ -143,16 +143,24 @@ + ChromaprintContext* chromaprint = + chromaprint_new(CHROMAPRINT_ALGORITHM_DEFAULT); + chromaprint_start(chromaprint, kDecodeRate, kDecodeChannels); +- chromaprint_feed(chromaprint, reinterpret_cast<void*>(data.data()), ++ chromaprint_feed(chromaprint, reinterpret_cast<int16_t *>(data.data()), + data.size() / 2); + chromaprint_finish(chromaprint); + +- void* fprint = nullptr; + int size = 0; ++ ++#if CHROMAPRINT_VERSION_MAJOR >= 1 && CHROMAPRINT_VERSION_MINOR >= 4 ++ u_int32_t *fprint = nullptr; ++ char *encoded = nullptr; ++#else ++ void *fprint = nullptr; ++ void *encoded = nullptr; ++#endif ++ + int ret = chromaprint_get_raw_fingerprint(chromaprint, &fprint, &size); ++ + QByteArray fingerprint; + if (ret == 1) { +- void* encoded = nullptr; + int encoded_size = 0; + chromaprint_encode_fingerprint(fprint, size, CHROMAPRINT_ALGORITHM_DEFAULT, + &encoded, &encoded_size, 1); |