FFmpeg.NET
FFmpeg.NET copied to clipboard
"Bug" fixed that FFmpeg with the CancellationToken doesn't always exit.
If you call Cancel() on the CancellationTokenSource and pass the CancellationToken to a Task like Engine.ExecuteAsync(string arguments, CancellationToken cancellationToken), ffmpeg.exe is not always terminated. Now it is checked whether the process is still running and if so, ffmpeg.exe will be terminated.
I'm new to GitHub. For my use case, this fix works. I only tested it in my scenario and recommend to test it again before merging. Please do not merge this pull request if the current behavior is intended to cancel only the task itself and dont kill the ffmpeg.exe process.