Fix condition

This commit is contained in:
Ali
2021-08-03 12:32:17 +02:00
parent aa7404d2d5
commit 321f4002ab

View File

@@ -19,7 +19,7 @@ final class SoftwareAnimationRenderer: ASDisplayNode, AnimationRenderer {
break 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 { switch type {
case .yuva: case .yuva:
data.withUnsafeBytes { bytes -> Void in data.withUnsafeBytes { bytes -> Void in
@@ -30,7 +30,7 @@ final class SoftwareAnimationRenderer: ASDisplayNode, AnimationRenderer {
assert(false) assert(false)
return 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: case .argb:
data.withUnsafeBytes { bytes -> Void in data.withUnsafeBytes { bytes -> Void in