summaryrefslogtreecommitdiff
path: root/internal/media/ffmpeg/runner.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/media/ffmpeg/runner.go')
-rw-r--r--internal/media/ffmpeg/runner.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/internal/media/ffmpeg/runner.go b/internal/media/ffmpeg/runner.go
index 8c59ac752..64ff6008c 100644
--- a/internal/media/ffmpeg/runner.go
+++ b/internal/media/ffmpeg/runner.go
@@ -19,9 +19,6 @@ package ffmpeg
import (
"context"
-
- "codeberg.org/gruf/go-ffmpreg/wasm"
- "github.com/tetratelabs/wazero"
)
// runner simply abstracts away the complexities
@@ -53,7 +50,7 @@ func (r *runner) Init(n int) {
// Run will attempt to pass the given compiled WebAssembly module with args to run(), waiting on
// the receiving runner until a free slot is available to run an instance, (if a limit is enabled).
-func (r *runner) Run(ctx context.Context, cmod wazero.CompiledModule, args Args) (uint32, error) {
+func (r *runner) Run(ctx context.Context, run func() (uint32, error)) (uint32, error) {
select {
// Context canceled.
case <-ctx.Done():
@@ -66,6 +63,6 @@ func (r *runner) Run(ctx context.Context, cmod wazero.CompiledModule, args Args)
// Release slot back to pool on end.
defer func() { r.pool <- struct{}{} }()
- // Pass to main module runner function.
- return wasm.Run(ctx, runtime, cmod, args)
+ // Call run.
+ return run()
}