From 76590bb04327e8972ad8b46197b227c4358ca05c Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Mon, 21 Dec 2020 22:02:05 -0800 Subject: [PATCH] Validate explicitly provided ffmpeg path. Closes #490 --- config/config.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index a65d15799..3229c1bb4 100644 --- a/config/config.go +++ b/config/config.go @@ -193,7 +193,11 @@ func (c *config) GetMaxNumberOfReferencedSegmentsInPlaylist() int { func (c *config) GetFFMpegPath() string { if c.FFMpegPath != "" { - return c.FFMpegPath + if err := verifyFFMpegPath(c.FFMpegPath); err == nil { + return c.FFMpegPath + } else { + log.Errorln(c.FFMpegPath, "is an invalid path to ffmpeg. Will try to use a copy in your path, if possible.") + } } // First look to see if ffmpeg is in the current working directory