Skip to content

Commit

Permalink
Bug 1058428 - Ensure all in-use decoders contain the target range - r…
Browse files Browse the repository at this point in the history
…=cajbir
  • Loading branch information
Jean-Yves Avenard committed Aug 27, 2014
1 parent 3f1e2a8 commit 7d82bae
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions content/media/mediasource/MediaSourceReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,18 @@ class ChangeToHaveMetadata : public nsRunnable {
bool
MediaSourceReader::DecodersContainTime(double aTime)
{
bool found = false;

for (uint32_t i = 0; i < mDecoders.Length(); ++i) {
if (!mDecoders[i]->IsDiscarded() && mDecoders[i]->ContainsTime(aTime)) {
return true;
if (!mDecoders[i]->IsDiscarded()) {
if (!mDecoders[i]->ContainsTime(aTime)) {
// No use to continue searching, one source buffer isn't ready yet
return false;
}
found = true;
}
}
return false;
return found;
}

nsresult
Expand Down

0 comments on commit 7d82bae

Please sign in to comment.