[EME] Make sure the hasSessionSemaphore is set even if HAVE(AVSTREAMSESSION) is false
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Mar 2019 19:10:58 +0000 (19:10 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Mar 2019 19:10:58 +0000 (19:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=195217

Reviewed by Eric Carlson.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242270 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm

index 9f0ed11..e174dfc 100644 (file)
@@ -1,3 +1,13 @@
+2019-03-01  Jer Noble  <jer.noble@apple.com>
+
+        [EME] Make sure the hasSessionSemaphore is set even if HAVE(AVSTREAMSESSION) is false
+        https://bugs.webkit.org/show_bug.cgi?id=195217
+
+        Reviewed by Eric Carlson.
+
+        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
+        (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
+
 2019-03-01  Justin Fan  <justin_fan@apple.com>
 
         [Web GPU] 32-bit builds broken by attempt to disable WebGPU on 32-bit
index d66b4db..ca7042a 100644 (file)
@@ -664,13 +664,14 @@ void SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataFo
     if (auto session = m_mediaSource->player()->cdmSession()) {
         session->addParser(m_parser.get());
         hasSessionSemaphore->signal();
-    } else {
-        if (m_hasSessionSemaphore)
-            m_hasSessionSemaphore->signal();
-        m_hasSessionSemaphore = hasSessionSemaphore;
+        return;
     }
 #endif
 
+    if (m_hasSessionSemaphore)
+        m_hasSessionSemaphore->signal();
+    m_hasSessionSemaphore = hasSessionSemaphore;
+    
 #if ENABLE(ENCRYPTED_MEDIA) && HAVE(AVCONTENTKEYSESSION)
     auto initDataBuffer = SharedBuffer::create(initData);
     auto keyIDs = CDMPrivateFairPlayStreaming::extractKeyIDsSinf(initDataBuffer);