From ad05301c7077fe1cb029bb144dac03d9dc58eba9 Mon Sep 17 00:00:00 2001 From: pepsin Date: Fri, 14 Dec 2018 11:56:59 +0800 Subject: [PATCH] Fill in missing translation --- SDAVAssetExportSession.m | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/SDAVAssetExportSession.m b/SDAVAssetExportSession.m index e99993b..3ba46a1 100755 --- a/SDAVAssetExportSession.m +++ b/SDAVAssetExportSession.m @@ -324,6 +324,16 @@ - (AVMutableVideoComposition *)buildDefaultVideoComposition naturalSize.width = naturalSize.height; naturalSize.height = width; } + + //Fix issues related to https://github.com/rs/SDAVAssetExportSession/issues/91 + if (videoAngleInDegree == 90 && transform.tx == 0) { + transform.tx = naturalSize.width; + } + + if (videoAngleInDegree == -90 && transform.ty == 0) { + transform.ty = naturalSize.height; + } + videoComposition.renderSize = naturalSize; // center inside {