Title: [164656] trunk/Source/WebCore
- Revision
- 164656
- Author
- jer.no...@apple.com
- Date
- 2014-02-25 10:24:13 -0800 (Tue, 25 Feb 2014)
Log Message
[EME][Mac] Fix a few issues in CDMSessionMediaSourceAVFObjC.
https://bugs.webkit.org/show_bug.cgi?id=129310
Reviewed by Eric Carlson.
Only send a 'keyerror' event if an actual error code was returned, not just
when no key was added:
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::addKeyTimerFired):
The 'length' parameter to a typed ArrayBufferView is the number of entries
in the array, not the byte length:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest):
The return value of streamingContentKeyRequestDataForApp:contentIdentifier:trackId:options:error
is autoreleased; do not wrap it in an adoptNS:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::update):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (164655 => 164656)
--- trunk/Source/WebCore/ChangeLog 2014-02-25 18:18:28 UTC (rev 164655)
+++ trunk/Source/WebCore/ChangeLog 2014-02-25 18:24:13 UTC (rev 164656)
@@ -1,3 +1,25 @@
+2014-02-25 Jer Noble <jer.no...@apple.com>
+
+ [EME][Mac] Fix a few issues in CDMSessionMediaSourceAVFObjC.
+ https://bugs.webkit.org/show_bug.cgi?id=129310
+
+ Reviewed by Eric Carlson.
+
+ Only send a 'keyerror' event if an actual error code was returned, not just
+ when no key was added:
+ * Modules/encryptedmedia/MediaKeySession.cpp:
+ (WebCore::MediaKeySession::addKeyTimerFired):
+
+ The 'length' parameter to a typed ArrayBufferView is the number of entries
+ in the array, not the byte length:
+ * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
+ (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest):
+
+ The return value of streamingContentKeyRequestDataForApp:contentIdentifier:trackId:options:error
+ is autoreleased; do not wrap it in an adoptNS:
+ * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
+ (WebCore::CDMSessionMediaSourceAVFObjC::update):
+
2014-02-25 Thiago de Barros Lacerda <thiago.lace...@openbossa.org>
[MediaStream] Adding mock implementation of UserMediaClient
Modified: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp (164655 => 164656)
--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp 2014-02-25 18:18:28 UTC (rev 164655)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp 2014-02-25 18:24:13 UTC (rev 164656)
@@ -200,7 +200,7 @@
}
// 2.8. If any of the preceding steps in the task failed
- if (!didStoreKey) {
+ if (errorCode) {
// 2.8.1. Create a new MediaKeyError object with the following attributes:
// code = the appropriate MediaKeyError code
// systemCode = a Key System-specific value, if provided, and 0 otherwise
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm (164655 => 164656)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm 2014-02-25 18:18:28 UTC (rev 164655)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm 2014-02-25 18:24:13 UTC (rev 164656)
@@ -74,7 +74,7 @@
String certificateString(ASCIILiteral("certificate"));
RefPtr<ArrayBuffer> buffer = ArrayBuffer::create(certificateString.length(), 2);
- RefPtr<JSC::Uint16Array> array = JSC::Uint16Array::create(buffer, 0, buffer->byteLength());
+ RefPtr<JSC::Uint16Array> array = JSC::Uint16Array::create(buffer, 0, certificateString.length());
for (unsigned i = 0, length = certificateString.length(); i < length; ++i)
array->set(i, certificateString[i]);
return Uint8Array::create(buffer, 0, buffer->byteLength());
@@ -96,7 +96,7 @@
RetainPtr<NSData> initData = adoptNS([[NSData alloc] initWithBytes:m_initData->data() length:m_initData->length()]);
NSError* error = nil;
- RetainPtr<NSData> request = adoptNS([m_parent->parser() streamingContentKeyRequestDataForApp:certificateData.get() contentIdentifier:initData.get() trackID:m_parent->protectedTrackID() options:nil error:&error]);
+ RetainPtr<NSData> request = [m_parent->parser() streamingContentKeyRequestDataForApp:certificateData.get() contentIdentifier:initData.get() trackID:m_parent->protectedTrackID() options:nil error:&error];
if (error) {
LOG(Media, "CDMSessionMediaSourceAVFObjC::update(%p) - error:%@", this, [error description]);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes