mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
Add ConfigureAwait(false)
This commit is contained in:
parent
e49290b217
commit
a12c322de9
1 changed files with 4 additions and 4 deletions
|
@ -62,13 +62,13 @@ public static async Task<IMediaAnalysis> 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<IMediaAnalysis> 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<IMediaAnalysis> AnalyseAsync(Stream stream, int outputCapacity = int.MaxValue)
|
||||
|
@ -81,7 +81,7 @@ public static async Task<IMediaAnalysis> 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<IMediaAnalysis> 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));
|
||||
|
||||
|
|
Loading…
Reference in a new issue