From b101d8f8a454c51c06d29f0475559c5828d4f606 Mon Sep 17 00:00:00 2001 From: TwistedUmbrellaX Date: Fri, 14 Jun 2024 03:30:30 -0400 Subject: [PATCH] Dispose of ffmpeg if terminated --- ConfusedPolarBear.Plugin.IntroSkipper/FFmpegWrapper.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/FFmpegWrapper.cs b/ConfusedPolarBear.Plugin.IntroSkipper/FFmpegWrapper.cs index 81a28c9..0201176 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/FFmpegWrapper.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/FFmpegWrapper.cs @@ -452,7 +452,10 @@ public static class FFmpegWrapper } while (bytesRead > 0); - ffmpeg.WaitForExit(timeout); + if (ffmpeg.WaitForExit(timeout)) + { + ffmpeg.Dispose(); + } var output = ms.ToArray();