Changeset 176482 in webkit
- Timestamp:
- Nov 21, 2014, 4:04:58 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r176481 r176482 1 2014-11-21 Jer Noble <jer.noble@apple.com> 2 3 [EME][Mac] Check the underlying error if the one returned by AVFoundation is AVErrorUnknown. 4 https://bugs.webkit.org/show_bug.cgi?id=138986 5 6 Reviewed by Eric Carlson. 7 8 When we recieve an error with the code AVErrorUnknown, look for an underlying error from CoreMedia (or another 9 lower-level framework) with a (presumably) more informative error code, and return that code instead. 10 11 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm: 12 (WebCore::systemCodeForError): 13 (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError): 14 (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError): 15 1 16 2014-11-21 Chris Fleizach <cfleizach@apple.com> 2 17 -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm
r175828 r176482 37 37 #import "SoftLinking.h" 38 38 #import "UUID.h" 39 #import <AVFoundation/AVError.h> 39 40 #import <CoreMedia/CMBase.h> 40 41 #import <cstdlib> … … 263 264 } 264 265 266 static NSInteger systemCodeForError(NSError *error) 267 { 268 NSInteger code = [error code]; 269 if (code != AVErrorUnknown) 270 return code; 271 272 NSError* underlyingError = [error valueForKey:NSUnderlyingErrorKey]; 273 if (!underlyingError || ![underlyingError isKindOfClass:[NSError class]]) 274 return code; 275 276 return [underlyingError code]; 277 } 278 265 279 void CDMSessionMediaSourceAVFObjC::layerDidReceiveError(AVSampleBufferDisplayLayer *, NSError *error) 266 280 { … … 268 282 return; 269 283 270 m_client->sendError(CDMSessionClient::MediaKeyErrorDomain, std::abs( [error code]));284 m_client->sendError(CDMSessionClient::MediaKeyErrorDomain, std::abs(systemCodeForError(error))); 271 285 } 272 286 … … 276 290 return; 277 291 278 m_client->sendError(CDMSessionClient::MediaKeyErrorDomain, std::abs( [error code]));292 m_client->sendError(CDMSessionClient::MediaKeyErrorDomain, std::abs(systemCodeForError(error))); 279 293 } 280 294
Note:
See TracChangeset
for help on using the changeset viewer.