ffmpegが異常終了した時は入力の書き込みの失敗より終了コードを返す

このコミットが含まれているのは:
routersys committed 2026-09-15 20:11:02 +09:00
1 親 9352e8e2c3
コミット 4f2e566ab8
2ファイル変更
+57 -4

検索条件に一致するファイルはありません

+5 -4
ファイルの表示
@@ -133,12 +133,13 @@ internal static class FFmpegProcessRunner
cancellationToken.ThrowIfCancellationRequested();
if (inputFailure is IOException)
throw new InvalidOperationException(string.Concat("Failed to send frames to FFmpeg. ", diagnostics.ToString()), inputFailure);
if (inputFailure is not null)
var result = new FFmpegProcessResult(process.ExitCode, diagnostics.ToString());
if (inputFailure is IOException && result.IsSuccess)
throw new InvalidOperationException(string.Concat("Failed to send frames to FFmpeg. ", result.Diagnostics), inputFailure);
if (inputFailure is not (null or IOException))
ExceptionDispatchInfo.Throw(inputFailure);
return new FFmpegProcessResult(process.ExitCode, diagnostics.ToString());
return result;
}
static async Task WriteStandardInputAsync(Process process, FFmpegInputWriter writer, CancellationToken cancellationToken)