From a12c322de9183307693f923c6a8dba958329dee4 Mon Sep 17 00:00:00 2001 From: Malte Rosenbjerg Date: Sat, 6 Mar 2021 23:05:38 +0100 Subject: [PATCH] Add ConfigureAwait(false) --- FFMpegCore/FFProbe/FFProbe.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/FFMpegCore/FFProbe/FFProbe.cs b/FFMpegCore/FFProbe/FFProbe.cs index 573a2ad..fab4b2e 100644 --- a/FFMpegCore/FFProbe/FFProbe.cs +++ b/FFMpegCore/FFProbe/FFProbe.cs @@ -62,13 +62,13 @@ public static async Task AnalyseAsync(string filePath, int outpu throw new FFMpegException(FFMpegExceptionType.File, $"No file found at '{filePath}'"); using var instance = PrepareInstance(filePath, outputCapacity); - await instance.FinishedRunning(); + await instance.FinishedRunning().ConfigureAwait(false); return ParseOutput(instance); } public static async Task AnalyseAsync(Uri uri, int outputCapacity = int.MaxValue) { using var instance = PrepareInstance(uri.AbsoluteUri, outputCapacity); - await instance.FinishedRunning(); + await instance.FinishedRunning().ConfigureAwait(false); return ParseOutput(instance); } public static async Task AnalyseAsync(Stream stream, int outputCapacity = int.MaxValue) @@ -81,7 +81,7 @@ public static async Task AnalyseAsync(Stream stream, int outputC var task = instance.FinishedRunning(); try { - await pipeArgument.During(); + await pipeArgument.During().ConfigureAwait(false); } catch(IOException) { @@ -90,7 +90,7 @@ public static async Task AnalyseAsync(Stream stream, int outputC { pipeArgument.Post(); } - var exitCode = await task; + var exitCode = await task.ConfigureAwait(false); if (exitCode != 0) throw new FFMpegException(FFMpegExceptionType.Process, $"FFProbe process returned exit status {exitCode}", null, string.Join("\n", instance.ErrorData));