From 8b3f63a900e805aa90e50a46d2eb832a0b05e2cf Mon Sep 17 00:00:00 2001 From: Sebastian Villena <97059974+ruisebas@users.noreply.github.com> Date: Fri, 26 Jul 2024 13:46:30 -0400 Subject: [PATCH] fix: Fixing a crash when attempting to call finishWriting (#161) --- 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 {} } }