From 70edad749a4b8e6b7b653b25e9f275de8b69e7ff Mon Sep 17 00:00:00 2001 From: Sergii Gordiienko Date: Sun, 3 Sep 2017 23:58:37 +0200 Subject: [PATCH] Issues #347 - Issue with "keepMirroringOnWrite = YES" - a black screen in video Analysis: [SCContext new] does not initialize CIContext and returns nil. Image can't be mirrored using nil CIContext and returns just black blank image frame in video. Solution: Init SCContext with suggested type in general SCRecorder initialization --- Library/Sources/SCRecorder.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Sources/SCRecorder.m b/Library/Sources/SCRecorder.m index 97183d0d..b778ac83 100644 --- a/Library/Sources/SCRecorder.m +++ b/Library/Sources/SCRecorder.m @@ -92,7 +92,8 @@ - (id)init { [_audioConfiguration addObserver:self forKeyPath:@"enabled" options:NSKeyValueObservingOptionNew context:SCRecorderAudioEnabledContext]; [_photoConfiguration addObserver:self forKeyPath:@"options" options:NSKeyValueObservingOptionNew context:SCRecorderPhotoOptionsContext]; - _context = [SCContext new].CIContext; + _context = [SCContext contextWithType:[SCContext suggestedContextType] + options:nil].CIContext; } return self;