Bug 1454630 - P4. Only wait for CDMProxy if actually needed for the given decoder. r=bryce, a=RyanVM
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 28 May 2018 15:10:19 +0200
changeset 473588 b4d1d4787481751c6809033303d3d8381bc56f5c
parent 473587 5326f573aaec25b0842d2f2695cce82757fd52e6
child 473589 8fefcb80fa929da893039edba7e470fc84a88806
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbryce, RyanVM
bugs1454630
milestone61.0
Bug 1454630 - P4. Only wait for CDMProxy if actually needed for the given decoder. r=bryce, a=RyanVM If the particular track isn't encrypted, there's no need to wait for a CDMProxy. MozReview-Commit-ID: DPbvbwsO58N
dom/media/MediaFormatReader.cpp
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -1496,17 +1496,18 @@ MediaFormatReader::PrepareToSetCDMForTra
   }
   ScheduleUpdate(aTrack);
 }
 
 bool
 MediaFormatReader::IsDecoderWaitingForCDM(TrackType aTrack)
 {
   MOZ_ASSERT(OnTaskQueue());
-  return IsEncrypted() && mSetCDMForTracks.contains(aTrack) && !mCDMProxy;
+  return GetDecoderData(aTrack).IsEncrypted() &&
+         mSetCDMForTracks.contains(aTrack) && !mCDMProxy;
 }
 
 RefPtr<SetCDMPromise>
 MediaFormatReader::SetCDMProxy(CDMProxy* aProxy)
 {
   MOZ_ASSERT(OnTaskQueue());
   LOGV("SetCDMProxy (%p)", aProxy);