diff --git a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs index ddd788c..7e79f55 100644 --- a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs +++ b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs @@ -1,10 +1,13 @@ using System; +using System.IO; using System.Runtime.InteropServices; namespace FFMpegCore.Pipes { static class PipeHelpers { + static readonly string PipePrefix = Path.Combine(Path.GetTempPath(), "CoreFxPipe_"); + public static string GetUnqiuePipeName() => "FFMpegCore_" + Guid.NewGuid(); public static string GetPipePath(string pipeName) @@ -12,7 +15,7 @@ public static string GetPipePath(string pipeName) if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) return $@"\\.\pipe\{pipeName}"; else - return $"unix:/tmp/CoreFxPipe_{pipeName}"; // dotnet uses unix sockets on unix, for more see https://github.com/dotnet/runtime/issues/24390 + return $"unix:{PipePrefix}{pipeName}"; // dotnet uses unix sockets on unix, for more see https://github.com/dotnet/runtime/issues/24390 } } }