Title: [178499] branches/safari-600.5-branch/Source/WebCore
- Revision
- 178499
- Author
- [email protected]
- Date
- 2015-01-15 02:27:42 -0800 (Thu, 15 Jan 2015)
Log Message
Merge r176482. rdar://problem/19424172
Modified Paths
Diff
Modified: branches/safari-600.5-branch/Source/WebCore/ChangeLog (178498 => 178499)
--- branches/safari-600.5-branch/Source/WebCore/ChangeLog 2015-01-15 10:27:34 UTC (rev 178498)
+++ branches/safari-600.5-branch/Source/WebCore/ChangeLog 2015-01-15 10:27:42 UTC (rev 178499)
@@ -1,5 +1,24 @@
2015-01-15 Matthew Hanson <[email protected]>
+ Merge r176482. rdar://problem/19424172
+
+ 2014-11-21 Jer Noble <[email protected]>
+
+ [EME][Mac] Check the underlying error if the one returned by AVFoundation is AVErrorUnknown.
+ https://bugs.webkit.org/show_bug.cgi?id=138986
+
+ Reviewed by Eric Carlson.
+
+ When we recieve an error with the code AVErrorUnknown, look for an underlying error from CoreMedia (or another
+ lower-level framework) with a (presumably) more informative error code, and return that code instead.
+
+ * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
+ (WebCore::systemCodeForError):
+ (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError):
+ (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError):
+
+2015-01-15 Matthew Hanson <[email protected]>
+
Merge r175828. rdar://problem/19424171
2014-11-10 Jer Noble <[email protected]>
Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm (178498 => 178499)
--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm 2015-01-15 10:27:34 UTC (rev 178498)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm 2015-01-15 10:27:42 UTC (rev 178499)
@@ -36,6 +36,7 @@
#import "SourceBufferPrivateAVFObjC.h"
#import "SoftLinking.h"
#import "UUID.h"
+#import <AVFoundation/AVError.h>
#import <CoreMedia/CMBase.h>
#import <objc/objc-runtime.h>
#import <wtf/NeverDestroyed.h>
@@ -261,12 +262,25 @@
return true;
}
+static NSInteger systemCodeForError(NSError *error)
+{
+ NSInteger code = [error code];
+ if (code != AVErrorUnknown)
+ return code;
+
+ NSError* underlyingError = [error valueForKey:NSUnderlyingErrorKey];
+ if (!underlyingError || ![underlyingError isKindOfClass:[NSError class]])
+ return code;
+
+ return [underlyingError code];
+}
+
void CDMSessionMediaSourceAVFObjC::layerDidReceiveError(AVSampleBufferDisplayLayer *, NSError *error)
{
if (!m_client)
return;
- m_client->sendError(CDMSessionClient::MediaKeyErrorDomain, abs([error code]));
+ m_client->sendError(CDMSessionClient::MediaKeyErrorDomain, abs(systemCodeForError(error)));
}
void CDMSessionMediaSourceAVFObjC::rendererDidReceiveError(AVSampleBufferAudioRenderer *, NSError *error)
@@ -274,7 +288,7 @@
if (!m_client)
return;
- m_client->sendError(CDMSessionClient::MediaKeyErrorDomain, abs([error code]));
+ m_client->sendError(CDMSessionClient::MediaKeyErrorDomain, abs(systemCodeForError(error)));
}
void CDMSessionMediaSourceAVFObjC::setStreamSession(AVStreamSession *streamSession)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes