Apply suggestions from code review

Co-authored-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
whiteowl3 2022-03-23 13:19:05 -04:00 committed by GitHub
parent 669029595b
commit 16a449a023
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -458,10 +458,9 @@ namespace MediaBrowser.MediaEncoding.Encoder
{
_logger.LogDebug("{ProcessFileName} {ProcessArgs}", process.StartInfo.FileName, process.StartInfo.Arguments);
}
using (var processWrapper = new ProcessWrapper(process, this))
{
MemoryStream memoryStream = new MemoryStream();
await using var memoryStream = new MemoryStream();
_logger.LogDebug("Starting ffprobe with args {Args}", args);
StartProcess(processWrapper);
await process.StandardOutput.BaseStream.CopyToAsync(memoryStream, cancellationToken: cancellationToken);