From 57258c6f5c58ce3b4954c1221be34303ee383b67 Mon Sep 17 00:00:00 2001 From: Malte Rosenbjerg Date: Mon, 7 Dec 2020 01:13:32 +0100 Subject: [PATCH] Only post in continuation --- FFMpegCore/FFMpeg/FFMpegArgumentProcessor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FFMpegCore/FFMpeg/FFMpegArgumentProcessor.cs b/FFMpegCore/FFMpeg/FFMpegArgumentProcessor.cs index ba53a48..424b598 100644 --- a/FFMpegCore/FFMpeg/FFMpegArgumentProcessor.cs +++ b/FFMpegCore/FFMpeg/FFMpegArgumentProcessor.cs @@ -65,7 +65,7 @@ void OnCancelEvent(object sender, EventArgs args) { errorCode = t.Result; cancellationTokenSource.Cancel(); - _ffMpegArguments.Post(); + // _ffMpegArguments.Post(); }), _ffMpegArguments.During(cancellationTokenSource.Token).ContinueWith(t => _ffMpegArguments.Post())); } catch (Exception e) @@ -111,7 +111,7 @@ await Task.WhenAll(instance.FinishedRunning().ContinueWith(t => { errorCode = t.Result; cancellationTokenSource.Cancel(); - _ffMpegArguments.Post(); + // _ffMpegArguments.Post(); }), _ffMpegArguments.During(cancellationTokenSource.Token).ContinueWith(t => _ffMpegArguments.Post())).ConfigureAwait(false); } catch (Exception e)