diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2017-05-02 14:15:52 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-02 14:15:52 -0400 |
commit | 3d541aa36e21f9d95a38aab411e03b667a62269e (patch) | |
tree | 0b4285f6ac410d6b2ea6da38427598ebf29349f6 | |
parent | 406e788e9c2f92fbc057c3b9874a676aabc94a95 (diff) | |
parent | ff834e9ca5e140691ee1d47269d8a6505384f66c (diff) | |
download | sdl_ios-3d541aa36e21f9d95a38aab411e03b667a62269e.tar.gz |
Merge pull request #610 from alexanderlavrushko/hotfix/issue_609_start_video_error_description
Fixed providing error info if video session is not started
-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..3bf380522 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 != NULL) { *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 != NULL) { *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 != NULL) { 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 != NULL) { *error = [NSError errorWithDomain:SDLErrorDomainStreamingMediaVideo code:SDLStreamingVideoErrorConfigurationCompressionSessionSetPropertyFailure userInfo:@{ @"OSStatus": @(status) }]; } |