summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlapinskijw <jlapinski.dev@gmail.com>2020-05-13 09:51:53 -0400
committerlapinskijw <jlapinski.dev@gmail.com>2020-05-13 09:51:53 -0400
commitef0ccd2f1070ce24b23bdaa5ac7cbe4f2e200eeb (patch)
tree984087d504288a780aa1525510f65e75ec0d5454
parent3c9c2075e91c95df85cfad210e8825c23731bf4a (diff)
downloadsdl_ios-ef0ccd2f1070ce24b23bdaa5ac7cbe4f2e200eeb.tar.gz
added HAX comment to explain fix
-rw-r--r--SmartDeviceLink/SDLH264VideoEncoder.m1
1 files changed, 1 insertions, 0 deletions
diff --git a/SmartDeviceLink/SDLH264VideoEncoder.m b/SmartDeviceLink/SDLH264VideoEncoder.m
index 4f4f11a77..58d6178af 100644
--- a/SmartDeviceLink/SDLH264VideoEncoder.m
+++ b/SmartDeviceLink/SDLH264VideoEncoder.m
@@ -159,6 +159,7 @@ static NSDictionary<NSString *, id>* _defaultVideoEncoderSettings;
OSStatus status = VTCompressionSessionEncodeFrame(_compressionSession, imageBuffer, presentationTimestamp, kCMTimeInvalid, NULL, (__bridge void *)self, NULL);
+ // HAX: [#1620](https://github.com/smartdevicelink/sdl_ios/issues/1620) On some older iPhones VTCompressionSessionEncodeFrame fails with a kVTInvalidSessionErr when the device is locked. Attempt to fix this by recreating the compression session.
if (status == kVTInvalidSessionErr) {
VTCompressionSessionCompleteFrames(_compressionSession, presentationTimestamp);
[self sdl_resetCompressionSession];