You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I pass a CancellationToken to ConvertAsync (for example), and then call Cancel() on the Token, the ffmpegnet library throws an exception with the message "A task was cancelled". That is good. However, the ffmpeg.exe process is not cancelled, and it continues to run in the background to completion, which can of course take a long time and consume large resources depending on the task.
I suggest that the library should catch the cancel exception, and abort the ffmpeg.exe process, and then rethrow the exception or throw one of your own exceptions. I believe you can abort the ffmpeg.exe process by sending "q" to the input stream of the process. This is better than just killing the process because "q" will leave the output file in a valid state.
The text was updated successfully, but these errors were encountered:
* Bug fix for issue #8: Cancel does not cancel ffmpeg.exe.
See #8.
When the calling program cancels the task by invoking Cancel() on the CancellationToken, send "q" to standard input of the ffmpeg.exe process.
This causes ffmpeg.exe to stop processing and shut down in an orderly way.
If I pass a CancellationToken to ConvertAsync (for example), and then call Cancel() on the Token, the ffmpegnet library throws an exception with the message "A task was cancelled". That is good. However, the ffmpeg.exe process is not cancelled, and it continues to run in the background to completion, which can of course take a long time and consume large resources depending on the task.
I suggest that the library should catch the cancel exception, and abort the ffmpeg.exe process, and then rethrow the exception or throw one of your own exceptions. I believe you can abort the ffmpeg.exe process by sending "q" to the input stream of the process. This is better than just killing the process because "q" will leave the output file in a valid state.
The text was updated successfully, but these errors were encountered: