Bug 1166836: Part4. Don't unecessarily call GetBuffered(). r=cpearce

Regression was introduced in 24a7f0fda98b (bug 1163445)
This commit is contained in:
Jean-Yves Avenard 2015-05-23 11:16:12 +10:00
parent 0f36d2451b
commit 507e5c4589

View File

@ -1713,8 +1713,11 @@ void MediaDecoderStateMachine::NotifyDataArrived(const char* aBuffer,
//
// Make sure to only do this if we have a start time, otherwise the reader
// doesn't know how to compute GetBuffered.
if (!mDecoder->IsInfinite() || mStartTime == -1) {
return;
}
media::TimeIntervals buffered{mDecoder->GetBuffered()};
if (mDecoder->IsInfinite() && (mStartTime != -1) && !buffered.IsInvalid()) {
if (!buffered.IsInvalid()) {
bool exists;
media::TimeUnit end{buffered.GetEnd(&exists)};
if (exists) {