[chore] update go ffmpreg to v0.6.0 (#3515)

* pull in go-ffmpreg v0.6.0

* add code comment

* grrr linter

* set empty module name when calling ffmpeg / ffprobe
This commit is contained in:
kim
2024-11-06 13:38:13 +00:00
committed by GitHub
parent 6f4cb2f14e
commit b84637801a
14 changed files with 159 additions and 123 deletions

View File

@ -14,6 +14,11 @@ import (
// wazero.Runtime on module instantiation.
type Args struct {
// Program name, depending on the
// module being run this may or may
// not be necessary.
Name string
// Optional further module configuration function.
// (e.g. to mount filesystem dir, set env vars, etc).
Config func(wazero.ModuleConfig) wazero.ModuleConfig
@ -39,7 +44,7 @@ func Run(
// Prefix arguments with module name.
cargs := make([]string, len(args.Args)+1)
cargs[0] = module.Name()
cargs[0] = args.Name
copy(cargs[1:], args.Args)
// Prepare new module configuration.