From 4a3ece0c6c22e6a3f376c26d38eb4dbad8ada420 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Fri, 9 Aug 2024 10:53:29 +0000 Subject: [bugfix] ensure testrig package only compiled-in when debug enabled (#3185) * ensure testrig package only compiled-in (including init) when debug enabled * add code comment to testrig init to indicate WebAssembly compilation --- testrig/config.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'testrig') diff --git a/testrig/config.go b/testrig/config.go index ed98798d6..6a4254d61 100644 --- a/testrig/config.go +++ b/testrig/config.go @@ -19,6 +19,7 @@ package testrig import ( "context" + "fmt" "os" "strconv" "time" @@ -34,11 +35,13 @@ func init() { ctx := context.Background() // Ensure global ffmpeg WASM pool initialized. + fmt.Println("testrig: precompiling ffmpeg WASM") if err := ffmpeg.InitFfmpeg(ctx, 1); err != nil { panic(err) } // Ensure global ffmpeg WASM pool initialized. + fmt.Println("testrig: precompiling ffprobe WASM") if err := ffmpeg.InitFfprobe(ctx, 1); err != nil { panic(err) } -- cgit v1.2.3