mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-12-18 12:05:45 +00:00
Compare commits
2 commits
f325160073
...
c92cfabc5d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c92cfabc5d | ||
|
|
65cbc5552c |
1 changed files with 3 additions and 3 deletions
|
|
@ -214,11 +214,11 @@ public static class FFProbe
|
||||||
|
|
||||||
private static void ThrowIfExitCodeNotZero(IProcessResult result, CancellationToken cancellationToken = default)
|
private static void ThrowIfExitCodeNotZero(IProcessResult result, CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
// if cancellation requested, then we are not interested in the exit code, just throw the cancellation exception
|
|
||||||
// to get consistent and expected behavior.
|
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
|
||||||
if (result.ExitCode != 0)
|
if (result.ExitCode != 0)
|
||||||
{
|
{
|
||||||
|
// if cancellation requested, then we are not interested in the exit code, just throw the cancellation exception
|
||||||
|
// to get consistent and expected behavior.
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
var message = $"ffprobe exited with non-zero exit-code ({result.ExitCode} - {string.Join("\n", result.ErrorData)})";
|
var message = $"ffprobe exited with non-zero exit-code ({result.ExitCode} - {string.Join("\n", result.ErrorData)})";
|
||||||
throw new FFMpegException(FFMpegExceptionType.Process, message, null, string.Join("\n", result.ErrorData));
|
throw new FFMpegException(FFMpegExceptionType.Process, message, null, string.Join("\n", result.ErrorData));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue