icecat: add release icecat-140.8.0-2gnu1 for ecne

This commit is contained in:
Ark74 2026-03-11 04:51:36 -06:00
parent 450538011a
commit 8eb1f1732f
616 changed files with 39955 additions and 33937 deletions

View file

@ -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 =