From 4d96c38d89a56ddb6461fe8f652f56a4787873e1 Mon Sep 17 00:00:00 2001 From: Sebastian Villena <97059974+ruisebas@users.noreply.github.com> Date: Thu, 25 Jul 2024 16:39:55 -0400 Subject: [PATCH] fix: Fixing a crash when attempting to call finishWriting --- Sources/FaceLiveness/AV/VideoChunker.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/FaceLiveness/AV/VideoChunker.swift b/Sources/FaceLiveness/AV/VideoChunker.swift index 8b014ba1..962cb798 100644 --- a/Sources/FaceLiveness/AV/VideoChunker.swift +++ b/Sources/FaceLiveness/AV/VideoChunker.swift @@ -44,7 +44,7 @@ final class VideoChunker { state = .awaitingSingleFrame // explicitly calling `endSession` is unnecessary - if state != .complete { + if assetWriter.status != .completed { assetWriter.finishWriting {} } }