diff options
author | Oleksandr Lavrushko <olavrushko@sygic.com> | 2017-04-25 15:58:29 +0200 |
---|---|---|
committer | Oleksandr Lavrushko <olavrushko@sygic.com> | 2017-04-25 15:58:29 +0200 |
commit | 732ed0ebdabbac49fb21ff851d40a41e5dfd8ae3 (patch) | |
tree | 2ff1e24b35f79a10b7a45fcbe0dcadd4bcd076d1 | |
parent | 406e788e9c2f92fbc057c3b9874a676aabc94a95 (diff) | |
download | sdl_ios-732ed0ebdabbac49fb21ff851d40a41e5dfd8ae3.tar.gz |
Issue 609 Fixed SDLStreamingMediaManager to provide error info if starting video session fails.
-rw-r--r-- | SmartDeviceLink/SDLStreamingMediaManager.m | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/SmartDeviceLink/SDLStreamingMediaManager.m b/SmartDeviceLink/SDLStreamingMediaManager.m index 3fceff4df..45e9c8841 100644 --- a/SmartDeviceLink/SDLStreamingMediaManager.m +++ b/SmartDeviceLink/SDLStreamingMediaManager.m @@ -416,7 +416,7 @@ void sdl_videoEncoderOutputCallback(void * CM_NULLABLE outputCallbackRefCon, voi if (status != noErr) { // TODO: Log the error - if (*error != nil) { + if (error != nil) { *error = [NSError errorWithDomain:SDLErrorDomainStreamingMediaVideo code:SDLStreamingVideoErrorConfigurationCompressionSessionCreationFailure userInfo:@{ @"OSStatus": @(status) }]; } @@ -430,7 +430,7 @@ void sdl_videoEncoderOutputCallback(void * CM_NULLABLE outputCallbackRefCon, voi CFDictionaryRef supportedProperties; status = VTSessionCopySupportedPropertyDictionary(self.compressionSession, &supportedProperties); if (status != noErr) { - if (*error != nil) { + if (error != nil) { *error = [NSError errorWithDomain:SDLErrorDomainStreamingMediaVideo code:SDLStreamingVideoErrorConfigurationCompressionSessionSetPropertyFailure userInfo:@{ @"OSStatus": @(status) }]; } @@ -439,7 +439,7 @@ void sdl_videoEncoderOutputCallback(void * CM_NULLABLE outputCallbackRefCon, voi for (NSString *key in self.videoEncoderSettings.allKeys) { if (CFDictionaryContainsKey(supportedProperties, (__bridge CFStringRef)key) == false) { - if (*error != nil) { + if (error != nil) { NSString *description = [NSString stringWithFormat:@"\"%@\" is not a supported key.", key]; *error = [NSError errorWithDomain:SDLErrorDomainStreamingMediaVideo code:SDLStreamingVideoErrorConfigurationCompressionSessionSetPropertyFailure userInfo:@{NSLocalizedDescriptionKey: description}]; } @@ -455,7 +455,7 @@ void sdl_videoEncoderOutputCallback(void * CM_NULLABLE outputCallbackRefCon, voi status = VTSessionSetProperty(self.compressionSession, (__bridge CFStringRef)key, (__bridge CFTypeRef)value); if (status != noErr) { - if (*error != nil) { + if (error != nil) { *error = [NSError errorWithDomain:SDLErrorDomainStreamingMediaVideo code:SDLStreamingVideoErrorConfigurationCompressionSessionSetPropertyFailure userInfo:@{ @"OSStatus": @(status) }]; } |