From d1fc9867bd256b182451f58c2188a6ead905e807 Mon Sep 17 00:00:00 2001 From: Dominik Polakovics Date: Mon, 4 Nov 2024 15:08:04 +0100 Subject: [PATCH] change os specific sysprocattr --- internal/logic/ffmpeg.go | 5 +++++ internal/logic/ffmpeg_windows.go | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/internal/logic/ffmpeg.go b/internal/logic/ffmpeg.go index e0f2c51..a70d3a2 100644 --- a/internal/logic/ffmpeg.go +++ b/internal/logic/ffmpeg.go @@ -6,8 +6,13 @@ package logic import ( "fmt" "os/exec" + "syscall" ) +func getSysProcAttr() *syscall.SysProcAttr { + return &syscall.SysProcAttr{} +} + func getFFProbePath() (string, error) { path, err := exec.LookPath("ffprobe") if err == nil { diff --git a/internal/logic/ffmpeg_windows.go b/internal/logic/ffmpeg_windows.go index d27a284..79fb649 100644 --- a/internal/logic/ffmpeg_windows.go +++ b/internal/logic/ffmpeg_windows.go @@ -11,6 +11,7 @@ import ( "os" "path/filepath" "strings" + "syscall" ) var tempDir string @@ -26,6 +27,10 @@ func getFFProbePath() (string, error) { return ffprobePath, nil } +func getSysProcAttr() *syscall.SysProcAttr { + return &syscall.SysProcAttr{HideWindow: true} +} + func getFFmpegPath() (string, error) { if ffmpegPath != "" {