Bug 487659. Make sure we never pass a playback rate of 0 to the media cache. r=doublec

--HG--
extra : rebase_source : af86613bb5283e777acf1ca01d67eaa734cb8a0f
This commit is contained in:
Robert O'Callahan 2009-05-19 11:05:13 +12:00
parent 0785b005eb
commit f1b439157e

View File

@ -2033,7 +2033,10 @@ void nsOggDecoder::UpdatePlaybackRate()
return;
PRPackedBool reliable;
PRUint32 rate = PRUint32(ComputePlaybackRate(&reliable));
if (!reliable) {
if (reliable) {
// Avoid passing a zero rate
rate = PR_MAX(rate, 1);
} else {
// Set a minimum rate of 10,000 bytes per second ... sometimes we just
// don't have good data
rate = PR_MAX(rate, 10000);