diff --git a/FFMpegCore/FFMpeg/Arguments/PipeArgument.cs b/FFMpegCore/FFMpeg/Arguments/PipeArgument.cs index e169400..fcb944a 100644 --- a/FFMpegCore/FFMpeg/Arguments/PipeArgument.cs +++ b/FFMpegCore/FFMpeg/Arguments/PipeArgument.cs @@ -40,8 +40,7 @@ public async Task During(CancellationToken cancellationToken = default) { try { - await ProcessDataAsync(cancellationToken); - Debug.WriteLine($"Disconnecting NamedPipeServerStream on {GetType().Name}"); + await ProcessDataAsync(cancellationToken); } catch (TaskCanceledException) { @@ -49,6 +48,7 @@ public async Task During(CancellationToken cancellationToken = default) } finally { + Debug.WriteLine($"Disconnecting NamedPipeServerStream on {GetType().Name}"); Pipe?.Disconnect(); } }