diff --git a/web/src/routes/convert/+page.svelte b/web/src/routes/convert/+page.svelte index 2a4b9cde..42769f79 100644 --- a/web/src/routes/convert/+page.svelte +++ b/web/src/routes/convert/+page.svelte @@ -4,6 +4,7 @@ import DropReceiver from "$components/misc/DropReceiver.svelte"; import FileReceiver from "$components/misc/FileReceiver.svelte"; + import { onDestroy } from "svelte"; let file: File | undefined; @@ -13,8 +14,11 @@ const render = async () => { if (!file) return; await ff.init(); - await ff.transcode(file); - }; + + onDestroy(async () => { + await ff.cleanup(); + ff.shutdown(); + }); $: if (file) { render(); diff --git a/web/src/routes/remux/+page.svelte b/web/src/routes/remux/+page.svelte index bd87c1f9..83c568c3 100644 --- a/web/src/routes/remux/+page.svelte +++ b/web/src/routes/remux/+page.svelte @@ -2,6 +2,7 @@ import mime from "mime"; import LibAVWrapper from "$lib/libav/remux"; + import { onDestroy } from "svelte"; import { beforeNavigate, goto } from "$app/navigation"; import { t } from "$lib/i18n/translations"; @@ -102,6 +103,7 @@ }); return; } + console.log(file_info) totalDuration = Number(file_info.format.duration); @@ -193,6 +195,8 @@ $: if (file) { render(); } + + onDestroy(() => ff.shutdown());