From 414ce1e616accb76fa680d2ffefc823cc1befe81 Mon Sep 17 00:00:00 2001 From: Lord-Giganticus <70081529+Lord-Giganticus@users.noreply.github.com> Date: Thu, 3 Mar 2022 12:40:56 -0600 Subject: [PATCH] Prevent a possible BSOD + Remove unneeded using statements --- THP-Converter-CS-CLI/Classes/Extensions.cs | 7 +------ THP-Converter-CS-CLI/Classes/MP4Video.cs | 6 +----- THP-Converter-CS-CLI/Classes/ProgramData.cs | 4 ---- THP-Converter-CS-CLI/Classes/THP.cs | 4 ---- THP-Converter-CS-CLI/Program.cs | 1 - THP-Conveter-CS/Classes/Copier.cs | 1 - THP-Conveter-CS/GUI/AboutBox.cs | 6 +----- THP-Conveter-CS/GUI/MP4.cs | 9 +-------- THP-Conveter-CS/GUI/THP.cs | 7 ------- THP-Conveter-CS/Main.cs | 7 ------- THP-Conveter-CS/Program.cs | 3 --- THP-Conveter-CS/Properties/AssemblyInfo.cs | 1 - 12 files changed, 4 insertions(+), 52 deletions(-) diff --git a/THP-Converter-CS-CLI/Classes/Extensions.cs b/THP-Converter-CS-CLI/Classes/Extensions.cs index 651b9f0..1bf4a0d 100644 --- a/THP-Converter-CS-CLI/Classes/Extensions.cs +++ b/THP-Converter-CS-CLI/Classes/Extensions.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; namespace THP_Converter_CS_CLI.Classes { diff --git a/THP-Converter-CS-CLI/Classes/MP4Video.cs b/THP-Converter-CS-CLI/Classes/MP4Video.cs index f745f29..0adf54a 100644 --- a/THP-Converter-CS-CLI/Classes/MP4Video.cs +++ b/THP-Converter-CS-CLI/Classes/MP4Video.cs @@ -1,10 +1,6 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; using System.Diagnostics; -using System.Threading.Tasks; using static THP_Converter_CS_CLI.Properties.Resources; namespace THP_Converter_CS_CLI.Classes @@ -59,7 +55,7 @@ public void Convert() Process.Start(startInfo: new() { FileName = "cmd.exe", - Arguments = "/c mplayer.exe -ao pcm:file=temp.wav video.mp4" + Arguments = "/c mplayer.exe -vo null -ao pcm:file=temp.wav video.mp4" }).WaitForExit(); File.Delete("mplayer.exe"); } diff --git a/THP-Converter-CS-CLI/Classes/ProgramData.cs b/THP-Converter-CS-CLI/Classes/ProgramData.cs index dd0afcd..8cc5db1 100644 --- a/THP-Converter-CS-CLI/Classes/ProgramData.cs +++ b/THP-Converter-CS-CLI/Classes/ProgramData.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.IO; -using System.Text; -using System.Threading.Tasks; namespace THP_Converter_CS_CLI.Classes { diff --git a/THP-Converter-CS-CLI/Classes/THP.cs b/THP-Converter-CS-CLI/Classes/THP.cs index fbd340d..867cec7 100644 --- a/THP-Converter-CS-CLI/Classes/THP.cs +++ b/THP-Converter-CS-CLI/Classes/THP.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Diagnostics; using System.Threading.Tasks; using FFmpeg.NET; using static THP_Converter_CS_CLI.Properties.Resources; diff --git a/THP-Converter-CS-CLI/Program.cs b/THP-Converter-CS-CLI/Program.cs index 766ae87..dcc4081 100644 --- a/THP-Converter-CS-CLI/Program.cs +++ b/THP-Converter-CS-CLI/Program.cs @@ -1,6 +1,5 @@ using System; using System.IO; -using System.Collections.Generic; using THP_Converter_CS_CLI.Classes; namespace THP_Converter_CS_CLI diff --git a/THP-Conveter-CS/Classes/Copier.cs b/THP-Conveter-CS/Classes/Copier.cs index ab68ad3..8f22b73 100644 --- a/THP-Conveter-CS/Classes/Copier.cs +++ b/THP-Conveter-CS/Classes/Copier.cs @@ -1,7 +1,6 @@ // From https://docs.microsoft.com/en-us/dotnet/standard/io/how-to-copy-directories using System; using System.IO; -using System.Reflection; namespace THP_Conveter_CS.Classes { diff --git a/THP-Conveter-CS/GUI/AboutBox.cs b/THP-Conveter-CS/GUI/AboutBox.cs index 55d9e9a..276235a 100644 --- a/THP-Conveter-CS/GUI/AboutBox.cs +++ b/THP-Conveter-CS/GUI/AboutBox.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Reflection; +using System.Reflection; using System.Windows.Forms; namespace THP_Conveter_CS.GUI diff --git a/THP-Conveter-CS/GUI/MP4.cs b/THP-Conveter-CS/GUI/MP4.cs index db2a528..b4d8731 100644 --- a/THP-Conveter-CS/GUI/MP4.cs +++ b/THP-Conveter-CS/GUI/MP4.cs @@ -1,11 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.IO; using System.Windows.Forms; using System.Diagnostics; @@ -128,7 +121,7 @@ private void button2_Click(object sender, EventArgs e) process.StartInfo = new ProcessStartInfo { FileName = "cmd.exe", - Arguments = "/c mplayer.exe -ao pcm:file=temp.wav video.mp4" + Arguments = "/c mplayer.exe -vo null -ao pcm:file=temp.wav video.mp4" }; process.Start(); process.WaitForExit(); diff --git a/THP-Conveter-CS/GUI/THP.cs b/THP-Conveter-CS/GUI/THP.cs index 1a4a20d..8776f8e 100644 --- a/THP-Conveter-CS/GUI/THP.cs +++ b/THP-Conveter-CS/GUI/THP.cs @@ -1,11 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.IO; using System.Windows.Forms; using FFmpeg.NET; diff --git a/THP-Conveter-CS/Main.cs b/THP-Conveter-CS/Main.cs index 43d3d19..8d9ed0c 100644 --- a/THP-Conveter-CS/Main.cs +++ b/THP-Conveter-CS/Main.cs @@ -1,11 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; namespace THP_Conveter_CS diff --git a/THP-Conveter-CS/Program.cs b/THP-Conveter-CS/Program.cs index 7bdf7b7..7f54340 100644 --- a/THP-Conveter-CS/Program.cs +++ b/THP-Conveter-CS/Program.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using System.Windows.Forms; namespace THP_Conveter_CS diff --git a/THP-Conveter-CS/Properties/AssemblyInfo.cs b/THP-Conveter-CS/Properties/AssemblyInfo.cs index 0075089..1b67bb5 100644 --- a/THP-Conveter-CS/Properties/AssemblyInfo.cs +++ b/THP-Conveter-CS/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following