From ef2b4be7c4e93951a2eff5415d161f6dd0efd396 Mon Sep 17 00:00:00 2001 From: Matthias Reitinger Date: Thu, 30 Nov 2023 17:23:25 +0100 Subject: [PATCH 1/2] Increase length of pipe name to make collisions less likely --- FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs index 108c146..c70cec1 100644 --- a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs +++ b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs @@ -4,7 +4,7 @@ namespace FFMpegCore.Pipes { internal static class PipeHelpers { - public static string GetUnqiuePipeName() => $"FFMpegCore_{Guid.NewGuid().ToString("N").Substring(0, 5)}"; + public static string GetUnqiuePipeName() => $"FFMpegCore_{Guid.NewGuid().ToString("N").Substring(16, 16)}"; public static string GetPipePath(string pipeName) { From c9e0cde17a6215651e694704b7af323c7dcbc364 Mon Sep 17 00:00:00 2001 From: Matthias Reitinger Date: Thu, 30 Nov 2023 17:23:47 +0100 Subject: [PATCH 2/2] Fix typo --- FFMpegCore/FFMpeg/Arguments/PipeArgument.cs | 2 +- FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/FFMpegCore/FFMpeg/Arguments/PipeArgument.cs b/FFMpegCore/FFMpeg/Arguments/PipeArgument.cs index 0751c9e..bc62bc4 100644 --- a/FFMpegCore/FFMpeg/Arguments/PipeArgument.cs +++ b/FFMpegCore/FFMpeg/Arguments/PipeArgument.cs @@ -14,7 +14,7 @@ public abstract class PipeArgument protected PipeArgument(PipeDirection direction) { - PipeName = PipeHelpers.GetUnqiuePipeName(); + PipeName = PipeHelpers.GetUniquePipeName(); _direction = direction; } diff --git a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs index c70cec1..69c54c6 100644 --- a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs +++ b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs @@ -4,7 +4,7 @@ namespace FFMpegCore.Pipes { internal static class PipeHelpers { - public static string GetUnqiuePipeName() => $"FFMpegCore_{Guid.NewGuid().ToString("N").Substring(16, 16)}"; + public static string GetUniquePipeName() => $"FFMpegCore_{Guid.NewGuid().ToString("N").Substring(16, 16)}"; public static string GetPipePath(string pipeName) {