diff --git a/MainForm.cs b/MainForm.cs index de8f890..38003de 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -260,12 +260,13 @@ namespace VideoPreview Clear(); + string ffmpegPath = Path.GetDirectoryName(Application.ExecutablePath) + @"\ffmpeg.exe"; MediaFile inputFile = new MediaFile { Filename = filename }; - using (Engine engine = new Engine(Path.GetDirectoryName(Application.ExecutablePath) + @"\ffmpeg.exe")) + using (Engine engine = new Engine(ffmpegPath)) { try { @@ -301,7 +302,7 @@ namespace VideoPreview int thumbnailWidth = flowLayoutPanel1.ClientSize.Width - flowLayoutPanel1.Padding.Horizontal - SystemInformation.VerticalScrollBarWidth; int thumbnailHeight = (int)Math.Round(decimal.Divide((decimal)thumbnailWidth, frameRatio)); - using (Engine engine = new Engine()) + using (Engine engine = new Engine(ffmpegPath)) { for (int i = 0; i < this.CurrentSession.NoFrames; i++) {