Bug 190946 - [EME][Cocoa] Cannot play unmuxed video and audio fMP4 streams encrypted with different keys via MSE
Summary: [EME][Cocoa] Cannot play unmuxed video and audio fMP4 streams encrypted with ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-10-26 00:22 PDT by Jer Noble
Modified: 2018-10-31 13:23 PDT (History)
2 users (show)

See Also:


Attachments
Patch (52.21 KB, patch)
2018-10-26 00:33 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (52.22 KB, patch)
2018-10-29 10:21 PDT, Jer Noble
eric.carlson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2018-10-26 00:22:36 PDT
-[EME][Cocoa] Cannot play unmuxed video and audio fMP4 streams encrypted with different keys via MSE
Comment 1 Jer Noble 2018-10-26 00:24:00 PDT
<rdar://problem/39383051>
Comment 2 Jer Noble 2018-10-26 00:33:52 PDT
Created attachment 353161 [details]
Patch
Comment 3 Jer Noble 2018-10-29 10:21:48 PDT
Created attachment 353297 [details]
Patch
Comment 4 Eric Carlson 2018-10-29 17:16:28 PDT
Comment on attachment 353297 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=353297&action=review

> Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:108
> +    AVContentKeySession* contentKeySession() { return m_session.get(); }

Can m_session ever be null? If so, should you return ensureSession() instead?
Comment 5 Jer Noble 2018-10-30 11:34:20 PDT
Comment on attachment 353297 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=353297&action=review

>> Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:108
>> +    AVContentKeySession* contentKeySession() { return m_session.get(); }
> 
> Can m_session ever be null? If so, should you return ensureSession() instead?

The m_session is set at creation time (in requestLicense(), which is called immediately after the object is created). It can only be null if there was an error when creating the AVContentKeySession. This is an objc object, so returning nil is fine, and we probably don't want to call ensureSession() all the time if the initial ensure() failed.
Comment 6 Jer Noble 2018-10-31 13:23:53 PDT
Committed r237649: <https://trac.webkit.org/changeset/237649>