From 386169afd5f3dd43857d565eae8a2de814dd09db Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 6 Oct 2014 16:48:08 -0700 Subject: [PATCH] Setup mirroring after session configuration so output respects mirror setting --- Source/PBJVision.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/PBJVision.m b/Source/PBJVision.m index 3be267e..50e4d59 100644 --- a/Source/PBJVision.m +++ b/Source/PBJVision.m @@ -385,8 +385,6 @@ - (void)_setCameraMode:(PBJCameraMode)cameraMode cameraDevice:(PBJCameraDevice)c _cameraDevice = cameraDevice; _cameraMode = cameraMode; - [self setMirroringMode:_mirroringMode]; - _outputFormat = outputFormat; // since there is no session in progress, set and bail @@ -409,6 +407,8 @@ - (void)_setCameraMode:(PBJCameraMode)cameraMode cameraDevice:(PBJCameraDevice)c [self _enqueueBlockOnCaptureSessionQueue:^{ // camera is already setup, no need to call _setupCamera [self _setupSession]; + + [self setMirroringMode:_mirroringMode]; [self _enqueueBlockOnMainQueue:^{ _flags.changingModes = NO; @@ -1184,6 +1184,8 @@ - (void)startPreview [self _setupCamera]; [self _setupSession]; } + + [self setMirroringMode:_mirroringMode]; if (_previewLayer && _previewLayer.session != _captureSession) { _previewLayer.session = _captureSession;