[Win] Extend AVFoundationCF Media Implementation
[WebKit-https.git] / Source / WebCore / platform / graphics / avfoundation / cf / CDMSessionAVFoundationCF.cpp
index 3d6f6c94f06b6c8db18e4ec694d6662fd0364b82..da13ea18a095d7f45ef472c852154ad894136029 100644 (file)
@@ -85,8 +85,7 @@ PassRefPtr<Uint8Array> CDMSessionAVFoundationCF::generateKeyRequest(const String
             userInfo = adoptCF(CFErrorCopyUserInfo(cfError));
 
             if (userInfo) {
-                CFErrorRef underlyingError = (CFErrorRef)CFDictionaryGetValue(userInfo.get(), kCFErrorUnderlyingErrorKey);
-                if (underlyingError)
+                if (CFErrorRef underlyingError = (CFErrorRef)CFDictionaryGetValue(userInfo.get(), kCFErrorUnderlyingErrorKey))
                     systemCode = CFErrorGetCode(underlyingError);
             }
 
@@ -113,9 +112,7 @@ bool CDMSessionAVFoundationCF::update(Uint8Array* key, RefPtr<Uint8Array>& nextM
     RetainPtr<CFMutableDataRef> keyData = adoptCF(CFDataCreateMutable(kCFAllocatorDefault, key->byteLength()));
     CFDataAppendBytes(keyData.get(), reinterpret_cast<const UInt8*>(key->baseAddress()), key->byteLength());
 
-    // TODO: AVCFAssetResourceLoadingDataRequestRespondWithData(m_request.get(), keyData.get());
-    // TODO: AVCFAssetResourceLoadingRequestFinishedLoading(m_request.get());
-    notImplemented();
+    AVCFAssetResourceLoadingRequestFinishLoadingWithResponse(m_request.get(), nullptr, keyData.get(), nullptr);
 
     errorCode = MediaPlayer::NoError;
     systemCode = 0;