Title: [252503] trunk/Source/WebCore
- Revision
- 252503
- Author
- jer.no...@apple.com
- Date
- 2019-11-15 15:00:19 -0800 (Fri, 15 Nov 2019)
Log Message
Unreviewed Mojave build fix after r252501; wrap calls to AVContentKeyRequest.options in
ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN / ALLOW_NEW_API_WITHOUT_GUARDS_END.
* platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
(WebCore::initTypeForRequest):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequests):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (252502 => 252503)
--- trunk/Source/WebCore/ChangeLog 2019-11-15 22:10:07 UTC (rev 252502)
+++ trunk/Source/WebCore/ChangeLog 2019-11-15 23:00:19 UTC (rev 252503)
@@ -1,5 +1,14 @@
2019-11-15 Jer Noble <jer.no...@apple.com>
+ Unreviewed Mojave build fix after r252501; wrap calls to AVContentKeyRequest.options in
+ ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN / ALLOW_NEW_API_WITHOUT_GUARDS_END.
+
+ * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
+ (WebCore::initTypeForRequest):
+ (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequests):
+
+2019-11-15 Jer Noble <jer.no...@apple.com>
+
REGRESSION(r251895) - 'sinf' init data flow generates 'cenc' style encrypted messages
https://bugs.webkit.org/show_bug.cgi?id=204239
<rdar://problem/57166445>
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm (252502 => 252503)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm 2019-11-15 22:10:07 UTC (rev 252502)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm 2019-11-15 23:00:19 UTC (rev 252503)
@@ -365,7 +365,15 @@
static AtomString initTypeForRequest(AVContentKeyRequest* request)
{
+ if (![request respondsToSelector:@selector(options)]) {
+ // AVContentKeyRequest.options was added in 10.14.4; if we are running on a previous version
+ // we don't have support for 'cenc' anyway, so just assume 'sinf'.
+ return CDMPrivateFairPlayStreaming::sinfName();
+ }
+
+ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN
auto nsInitType = (NSString*)[request.options valueForKey:InitializationDataTypeKey];
+ALLOW_NEW_API_WITHOUT_GUARDS_END
if (![nsInitType isKindOfClass:NSString.class])
return emptyAtom();
@@ -751,7 +759,7 @@
if (requests.isEmpty())
return;
- auto initDataType = AtomString((NSString *)[requests.first().get().options valueForKey:InitializationDataTypeKey]);
+ auto initDataType = initTypeForRequest(requests.first().get());
if (initDataType != InitDataRegistry::cencName()) {
didProvideRequest(requests.first().get());
requests.remove(0);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes