Bug 1276495: Don't reset audio promises for video only seek. r=jwwang,jya
authorDan Glastonbury <dglastonbury@mozilla.com>
Mon, 30 May 2016 15:54:04 +1000
changeset 299560 066a18a85a040f75d88d182767b9a47aa7b0c2fc
parent 299559 370c3f49909828b052c30f192815de7a36bbe851
child 299561 109250561b779e707f1f8cde8f54da8f6efb4c06
push id77628
push userdglastonbury@mozilla.com
push dateTue, 31 May 2016 00:31:55 +0000
treeherdermozilla-inbound@066a18a85a04 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwwang, jya
bugs1276495
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1276495: Don't reset audio promises for video only seek. r=jwwang,jya ResetDecode was disconnecting mAudioDataRequest when seeking video only. This means that, if a RequestAudioData() was outstanding, mAudioDataRequest and MFR.mAudio.mHasPromise would become out-of-sync. MozReview-Commit-ID: EaS5NERsxpt
dom/media/MediaDecoderReaderWrapper.cpp
--- a/dom/media/MediaDecoderReaderWrapper.cpp
+++ b/dom/media/MediaDecoderReaderWrapper.cpp
@@ -392,19 +392,21 @@ MediaDecoderReaderWrapper::SetIdle()
   mReader->OwnerThread()->Dispatch(r.forget());
 }
 
 void
 MediaDecoderReaderWrapper::ResetDecode(TargetQueues aQueues)
 {
   MOZ_ASSERT(mOwnerThread->IsCurrentThreadIn());
 
-  mAudioDataRequest.DisconnectIfExists();
+  if (aQueues == MediaDecoderReader::AUDIO_VIDEO) {
+    mAudioDataRequest.DisconnectIfExists();
+    mAudioWaitRequest.DisconnectIfExists();
+  }
   mVideoDataRequest.DisconnectIfExists();
-  mAudioWaitRequest.DisconnectIfExists();
   mVideoWaitRequest.DisconnectIfExists();
 
   nsCOMPtr<nsIRunnable> r =
     NewRunnableMethod<TargetQueues>(mReader,
                                     &MediaDecoderReader::ResetDecode,
                                     aQueues);
   mReader->OwnerThread()->Dispatch(r.forget());
 }