From 321f4002ab8a10f149aa096798de68fc863d3954 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Tue, 3 Aug 2021 12:32:17 +0200 Subject: [PATCH] Fix condition --- .../Sources/SoftwareAnimationRenderer.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/AnimatedStickerNode/Sources/SoftwareAnimationRenderer.swift b/submodules/AnimatedStickerNode/Sources/SoftwareAnimationRenderer.swift index 82dbf9364d..70658638c4 100644 --- a/submodules/AnimatedStickerNode/Sources/SoftwareAnimationRenderer.swift +++ b/submodules/AnimatedStickerNode/Sources/SoftwareAnimationRenderer.swift @@ -19,7 +19,7 @@ final class SoftwareAnimationRenderer: ASDisplayNode, AnimationRenderer { break } - let image = generateImagePixel(CGSize(width: CGFloat(width), height: CGFloat(height)), scale: 1.0, pixelGenerator: { _, pixelData, bytesPerRow in + let image = generateImagePixel(CGSize(width: CGFloat(width), height: CGFloat(height)), scale: 1.0, pixelGenerator: { _, pixelData, contextBytesPerRow in switch type { case .yuva: data.withUnsafeBytes { bytes -> Void in @@ -30,7 +30,7 @@ final class SoftwareAnimationRenderer: ASDisplayNode, AnimationRenderer { assert(false) return } - decodeYUVAToRGBA(baseAddress.assumingMemoryBound(to: UInt8.self), pixelData, Int32(width), Int32(height), Int32(bytesPerRow)) + decodeYUVAToRGBA(baseAddress.assumingMemoryBound(to: UInt8.self), pixelData, Int32(width), Int32(height), Int32(contextBytesPerRow)) } case .argb: data.withUnsafeBytes { bytes -> Void in