diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Chromaprint.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Chromaprint.cs index 46854a9..0cca214 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Chromaprint.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Chromaprint.cs @@ -114,9 +114,14 @@ public static class Chromaprint var info = new ProcessStartInfo(ffmpegPath, args) { + WindowStyle = ProcessWindowStyle.Hidden, CreateNoWindow = true, + UseShellExecute = false, + ErrorDialog = false, + + // We only consume standardOutput. RedirectStandardOutput = true, - RedirectStandardError = true + RedirectStandardError = false }; var ffmpeg = new Process @@ -125,7 +130,6 @@ public static class Chromaprint }; ffmpeg.Start(); - ffmpeg.WaitForExit(timeout); using (MemoryStream ms = new MemoryStream()) { @@ -139,6 +143,8 @@ public static class Chromaprint } while (bytesRead > 0); + ffmpeg.WaitForExit(timeout); + return ms.ToArray().AsSpan(); } }