Skip to content

Commit d1fc986

Browse files
committed
change os specific sysprocattr
1 parent cf90389 commit d1fc986

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

internal/logic/ffmpeg.go

+5
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@ package logic
66
import (
77
"fmt"
88
"os/exec"
9+
"syscall"
910
)
1011

12+
func getSysProcAttr() *syscall.SysProcAttr {
13+
return &syscall.SysProcAttr{}
14+
}
15+
1116
func getFFProbePath() (string, error) {
1217
path, err := exec.LookPath("ffprobe")
1318
if err == nil {

internal/logic/ffmpeg_windows.go

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"os"
1212
"path/filepath"
1313
"strings"
14+
"syscall"
1415
)
1516

1617
var tempDir string
@@ -26,6 +27,10 @@ func getFFProbePath() (string, error) {
2627
return ffprobePath, nil
2728
}
2829

30+
func getSysProcAttr() *syscall.SysProcAttr {
31+
return &syscall.SysProcAttr{HideWindow: true}
32+
}
33+
2934

3035
func getFFmpegPath() (string, error) {
3136
if ffmpegPath != "" {

0 commit comments

Comments
 (0)