From be8086b3d5f7bd00577942c41ba13e0d146854cf Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Thu, 28 May 2020 17:22:41 +0300 Subject: [PATCH] Video editor fixes --- .../Sources/LegacyPaintStickersContext.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/LegacyMediaPickerUI/Sources/LegacyPaintStickersContext.swift b/submodules/LegacyMediaPickerUI/Sources/LegacyPaintStickersContext.swift index 4969b03b6e..38f9480628 100644 --- a/submodules/LegacyMediaPickerUI/Sources/LegacyPaintStickersContext.swift +++ b/submodules/LegacyMediaPickerUI/Sources/LegacyPaintStickersContext.swift @@ -329,7 +329,7 @@ public final class LegacyPaintEntityRenderer: NSObject, TGPhotoPaintEntityRender var result: Double let minDuration: Double = 3.0 if durations.count > 1 { - result = min(6.0, Double(durations.reduce(1) { lcm(Int32($0), Int32($1)) })) + result = min(6.0, Double(durations.reduce(1.0) { Double(lcm(Int32($0 * 10.0), Int32($1 * 10.0))) }) / 10.0) } else if let duration = durations.first { result = duration } else {