Skip to content

Commit 01c8321

Browse files
authored
Merge pull request #97 from lostdusty/patch-1
Don't assume ffmpeg paths
2 parents ee92729 + c72f40b commit 01c8321

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

internal/gui/settings.go

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"path/filepath"
99
"runtime"
1010
"time"
11+
"os/exec"
1112

1213
"fyne.io/fyne/v2"
1314
"fyne.io/fyne/v2/container"
@@ -75,17 +76,8 @@ func settingsWindow(s *FyneScreen) fyne.CanvasObject {
7576
return fyne.CurrentApp().Preferences().String("ffmpeg")
7677
}
7778

78-
os := runtime.GOOS
79-
switch os {
80-
case "windows":
81-
return "C:/ffmpeg/bin/ffmpeg"
82-
case "linux":
83-
return "ffmpeg"
84-
case "darwin":
85-
return "/opt/homebrew/bin/ffmpeg"
86-
default:
87-
return "ffmpeg"
88-
}
79+
path, _ := exec.LookPath("ffmpeg")
80+
return path
8981

9082
}()
9183
ffmpegTextEntry.Refresh()

0 commit comments

Comments
 (0)