From bc968dcdae0a509e52ae3ba579d78b3f74b0c534 Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 22 Jul 2024 13:58:12 +0930 Subject: [PATCH] Fix incorrect scale on back camera in reverse landscape (#1559) Co-authored-by: bemusementpark --- .../securesms/webrtc/video/RemoteRotationVideoProxySink.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/webrtc/video/RemoteRotationVideoProxySink.kt b/app/src/main/java/org/thoughtcrime/securesms/webrtc/video/RemoteRotationVideoProxySink.kt index 62b78d6ec8..a2609187f0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/webrtc/video/RemoteRotationVideoProxySink.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/webrtc/video/RemoteRotationVideoProxySink.kt @@ -14,7 +14,7 @@ class RemoteRotationVideoProxySink: VideoSink { val thisSink = targetSink ?: return val thisFrame = frame ?: return - val modifiedRotation = thisFrame.rotation - rotation + val modifiedRotation = (thisFrame.rotation - rotation + 360) % 360 val newFrame = VideoFrame(thisFrame.buffer, modifiedRotation, thisFrame.timestampNs) thisSink.onFrame(newFrame)