From 017af646de7392d962f8e366414518184afb8c36 Mon Sep 17 00:00:00 2001 From: Daniel Widerin Date: Sun, 25 Oct 2020 09:23:19 +0100 Subject: [PATCH] drop fallback with extension Signed-off-by: Daniel Widerin --- encoder.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/encoder.go b/encoder.go index 8600eb6..d3270ad 100644 --- a/encoder.go +++ b/encoder.go @@ -143,12 +143,7 @@ func (enc *X264ImageCustomEncoder) Init(videoFileName string) { } func (enc *X264ImageCustomEncoder) Run(videoFileName string) error { if _, err := os.Stat(enc.FFMpegBinPath); os.IsNotExist(err) { - if _, err := os.Stat(enc.FFMpegBinPath + ".exe"); os.IsNotExist(err) { - log.Error("encoder file doesn't exist in path:", enc.FFMpegBinPath) - return errors.New("encoder file doesn't exist in path" + videoFileName) - } else { - enc.FFMpegBinPath = enc.FFMpegBinPath + ".exe" - } + return err } enc.Init(videoFileName)