From 75e4f6f257af2f22f09998ee7c522563feb65b27 Mon Sep 17 00:00:00 2001 From: ep1kt3t0s <86835785+ep1kt3t0s@users.noreply.github.com> Date: Sun, 11 Dec 2022 17:05:58 +0000 Subject: [PATCH] Fix GetPipePath() for MacOS --- FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs index 2890e82..cb237ed 100644 --- a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs +++ b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs @@ -1,4 +1,5 @@ using System; +using System.IO; using System.Runtime.InteropServices; namespace FFMpegCore.Pipes @@ -11,8 +12,9 @@ public static string GetPipePath(string pipeName) { if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) return $@"\\.\pipe\{pipeName}"; - else - return $"unix:/tmp/CoreFxPipe_{pipeName}"; + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + return $"unix:{Path.GetTempPath()}/CoreFxPipe_{pipeName}"; + return $"unix:/tmp/CoreFxPipe_{pipeName}"; } } }