зеркало из https://github.com/mozilla/gecko-dev.git
Bug 867089 - Validate the playbackRate before using it. r=ehsan
This commit is contained in:
Родитель
7e553108c7
Коммит
616d1f9c6c
|
@ -312,6 +312,11 @@ public:
|
|||
mPlaybackRate = mPlaybackRateTimeline.GetValueAtTime<TrackTicks>(aStream->GetCurrentPosition());
|
||||
}
|
||||
|
||||
// Make sure the playback rate if something our resampler can work with.
|
||||
if (mPlaybackRate <= 0.0 || mPlaybackRate >= 1024) {
|
||||
mPlaybackRate = 1.0;
|
||||
}
|
||||
|
||||
uint32_t currentOutSampleRate, currentInSampleRate;
|
||||
if (ShouldResample()) {
|
||||
SpeexResamplerState* resampler = Resampler(mChannels);
|
||||
|
|
Загрузка…
Ссылка в новой задаче