Skip to content

Commit

Permalink
Prevent a possible BSOD + Remove unneeded using statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Lord-Giganticus committed Mar 3, 2022
1 parent 1022a62 commit 414ce1e
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 52 deletions.
7 changes: 1 addition & 6 deletions THP-Converter-CS-CLI/Classes/Extensions.cs
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
6 changes: 1 addition & 5 deletions THP-Converter-CS-CLI/Classes/MP4Video.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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");
}
Expand Down
4 changes: 0 additions & 4 deletions THP-Converter-CS-CLI/Classes/ProgramData.cs
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
4 changes: 0 additions & 4 deletions THP-Converter-CS-CLI/Classes/THP.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 0 additions & 1 deletion THP-Converter-CS-CLI/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.IO;
using System.Collections.Generic;
using THP_Converter_CS_CLI.Classes;

namespace THP_Converter_CS_CLI
Expand Down
1 change: 0 additions & 1 deletion THP-Conveter-CS/Classes/Copier.cs
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
6 changes: 1 addition & 5 deletions THP-Conveter-CS/GUI/AboutBox.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 1 addition & 8 deletions THP-Conveter-CS/GUI/MP4.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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();
Expand Down
7 changes: 0 additions & 7 deletions THP-Conveter-CS/GUI/THP.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
7 changes: 0 additions & 7 deletions THP-Conveter-CS/Main.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 0 additions & 3 deletions THP-Conveter-CS/Program.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion THP-Conveter-CS/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 414ce1e

Please sign in to comment.