mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
Added exit code checking to FFProbe stream methods
Former-commit-id: 883185b5ec
This commit is contained in:
parent
5edd89dc90
commit
50f353aac7
1 changed files with 4 additions and 0 deletions
|
@ -99,6 +99,7 @@ public VideoInfo ParseVideoInfo(System.IO.Stream stream)
|
|||
|
||||
if (exitCode != 0)
|
||||
throw new FFMpegException(FFMpegExceptionType.Process, "FFProbe process returned exit status " + exitCode);
|
||||
|
||||
var output = string.Join("", instance.OutputData);
|
||||
return ParseVideoInfoInternal(info, output);
|
||||
}
|
||||
|
@ -132,6 +133,9 @@ public async Task<VideoInfo> ParseVideoInfoAsync(System.IO.Stream stream)
|
|||
}
|
||||
var exitCode = await task;
|
||||
|
||||
if (exitCode != 0)
|
||||
throw new FFMpegException(FFMpegExceptionType.Process, "FFProbe process returned exit status " + exitCode);
|
||||
|
||||
var output = string.Join("", instance.OutputData);
|
||||
return ParseVideoInfoInternal(info, output);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue