Bug 1315586 - DecodedStream::NotifyOutput() should compare |a->mTime| to GetPosition() instead of |aTime|.
MozReview-Commit-ID: AyqsW9w5Je0
--- a/dom/media/mediasink/DecodedStream.cpp
+++ b/dom/media/mediasink/DecodedStream.cpp
@@ -724,20 +724,21 @@ DecodedStream::GetPosition(TimeStamp* aT
return mStartTime.ref() + mLastOutputTime;
}
void
DecodedStream::NotifyOutput(int64_t aTime)
{
AssertOwnerThread();
mLastOutputTime = aTime;
+ int64_t currentTime = GetPosition();
// Remove audio samples that have been played by MSG from the queue.
RefPtr<MediaData> a = mAudioQueue.PeekFront();
- for (; a && a->mTime < aTime;) {
+ for (; a && a->mTime < currentTime;) {
RefPtr<MediaData> releaseMe = mAudioQueue.PopFront();
a = mAudioQueue.PeekFront();
}
}
void
DecodedStream::ConnectListener()
{