mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-12 20:49:04 +08:00
29 lines
1.1 KiB
Diff
29 lines
1.1 KiB
Diff
commit 2a91bff2810281e58948f478e9396c73e5c6154a
|
|
Author: Urs Fleisch <ufleisch@users.sourceforge.net>
|
|
Date: Mon Jun 4 15:23:36 2012 +0200
|
|
|
|
Support building with ffmpeg-0.11.
|
|
|
|
diff --git a/src/core/import/fingerprintcalculator.cpp b/src/core/import/fingerprintcalculator.cpp
|
|
index 05158ae..6ac632c 100644
|
|
--- a/src/core/import/fingerprintcalculator.cpp
|
|
+++ b/src/core/import/fingerprintcalculator.cpp
|
|
@@ -218,7 +218,7 @@ public:
|
|
}
|
|
|
|
bool createForCodec(const Codec& codecCtx) {
|
|
- m_ptr = ::av_audio_convert_alloc(SAMPLE_FMT_S16, codecCtx.channels(),
|
|
+ m_ptr = ::av_audio_convert_alloc(AV_SAMPLE_FMT_S16, codecCtx.channels(),
|
|
codecCtx.sampleFormat(), codecCtx.channels(), 0, 0);
|
|
return m_ptr != 0;
|
|
}
|
|
@@ -342,7 +342,7 @@ FingerprintCalculator::Result::Error FingerprintCalculator::decodeAudioFile(
|
|
return Result::NoCodecFound;
|
|
|
|
Converter converter;
|
|
- if (codec.sampleFormat() != SAMPLE_FMT_S16) {
|
|
+ if (codec.sampleFormat() != AV_SAMPLE_FMT_S16) {
|
|
if (!converter.createForCodec(codec))
|
|
return Result::NoConverterFound;
|
|
}
|