From bc272b910e7f2cdbbf3eab4383464c635b6ab6c7 Mon Sep 17 00:00:00 2001
From: dumbmoron <log@riseup.net>
Date: Mon, 12 Aug 2024 20:36:24 +0000
Subject: [PATCH] web/libav: fix import double slash, use unlinkreadaheadfile

---
 web/src/lib/libav.ts | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/web/src/lib/libav.ts b/web/src/lib/libav.ts
index e363866f..e0c15404 100644
--- a/web/src/lib/libav.ts
+++ b/web/src/lib/libav.ts
@@ -15,10 +15,11 @@ export default class LibAVWrapper {
         if (!this.libav) {
             this.libav = await LibAV.LibAV({
                 yesthreads: true,
-                base: '/_libav/'
-            })
+                base: '/_libav'
+            });
         }
     }
+    }
 
     async render({ blob, output, args }: RenderParams) {
         if (!this.libav) throw new Error("LibAV wasn't initialized");
@@ -78,10 +79,7 @@ export default class LibAVWrapper {
         ]);
 
         await this.libav.unlink(outputName);
-
-        // FIXME: this is not correct, and needs to be replaced
-        //        with unlinkmkreadaheadfile().
-        await this.libav.unlink("input");
+        await this.libav.unlinkreadaheadfile("input");
 
         const renderBlob = new Blob(
             [ writtenData ],