icecat: add release icecat-140.8.0-2gnu1 for ecne
This commit is contained in:
parent
450538011a
commit
8eb1f1732f
616 changed files with 39955 additions and 33937 deletions
|
|
@ -229,7 +229,12 @@ class AutoResampler final {
|
|||
MOZ_ASSERT(mResampler);
|
||||
return mResampler;
|
||||
}
|
||||
void operator=(SpeexResamplerState* aResampler) { mResampler = aResampler; }
|
||||
void operator=(SpeexResamplerState* aResampler) {
|
||||
if (mResampler) {
|
||||
speex_resampler_destroy(mResampler);
|
||||
}
|
||||
mResampler = aResampler;
|
||||
}
|
||||
|
||||
private:
|
||||
SpeexResamplerState* mResampler;
|
||||
|
|
@ -564,6 +569,13 @@ void MediaDecodeTask::FinishDecode() {
|
|||
}
|
||||
mDecodeJob.mBuffer.mBuffer = std::move(newBuffers);
|
||||
channelCount = audioData->mChannels;
|
||||
|
||||
// Don't bother draining the previous resampler for unexpected edge case.
|
||||
if (sampleRate != destSampleRate) {
|
||||
resampler = speex_resampler_init(channelCount, sampleRate, destSampleRate,
|
||||
SPEEX_RESAMPLER_QUALITY_DEFAULT, nullptr);
|
||||
speex_resampler_skip_zeros(resampler);
|
||||
}
|
||||
}
|
||||
|
||||
const AudioDataValue* bufferData =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue