Skip to content

Commit

Permalink
Cherry-pick 261925@main (38857c7). https://bugs.webkit.org/show_bug.c…
Browse files Browse the repository at this point in the history
…gi?id=254215

    [GStreamer][Thunder][PlayReady] Insert swapped key id before
    https://bugs.webkit.org/show_bug.cgi?id=254215

    Reviewed by Philippe Normand.

    We need to insert the swapped key ID before the non swapped one because the original key ID is moved into the store.

    * Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.cpp:
    (WebCore::CDMInstanceSessionThunder::keyUpdatedCallback):

    Canonical link: https://commits.webkit.org/261925@main
  • Loading branch information
calvaris authored and aperezdc committed Apr 13, 2023
1 parent 6a874cf commit 059db72
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -443,7 +443,7 @@ void CDMInstanceSessionThunder::keyUpdatedCallback(KeyIDType&& keyID)

auto keyStatus = status(keyID);
GST_DEBUG("updated with with key status %s", toString(keyStatus));
m_doesKeyStoreNeedMerging |= m_keyStore.add(KeyHandle::create(keyStatus, WTFMove(keyID), BoxPtr<OpenCDMSession>(m_session)));

auto instance = cdmInstanceThunder();
if (instance && GStreamerEMEUtilities::isPlayReadyKeySystem(instance->keySystem())) {
// PlayReady corner case hack: It happens that the key ID
Expand All @@ -458,6 +458,8 @@ void CDMInstanceSessionThunder::keyUpdatedCallback(KeyIDType&& keyID)
GST_MEMDUMP("updated swapped key", swappedKeyID.data(), swappedKeyID.size());
m_doesKeyStoreNeedMerging |= m_keyStore.add(KeyHandle::create(keyStatus, WTFMove(swappedKeyID), BoxPtr<OpenCDMSession>(m_session)));
}

m_doesKeyStoreNeedMerging |= m_keyStore.add(KeyHandle::create(keyStatus, WTFMove(keyID), BoxPtr<OpenCDMSession>(m_session)));
}

void CDMInstanceSessionThunder::keysUpdateDoneCallback()
Expand Down

0 comments on commit 059db72

Please sign in to comment.