Fix all warnings in MediaBrowser.MediaEncoding (#9073)

This commit is contained in:
Bond-009
2023-01-12 01:22:01 +01:00
committed by GitHub
parent 515e69dcf7
commit 81c8890b6d
4 changed files with 60 additions and 27 deletions

View File

@@ -498,11 +498,12 @@ namespace MediaBrowser.MediaEncoding.Encoder
_logger.LogInformation("Starting {ProcessFileName} with args {ProcessArgs}", _ffprobePath, args);
var memoryStream = new MemoryStream();
await using (memoryStream.ConfigureAwait(false))
using (var processWrapper = new ProcessWrapper(process, this))
{
await using var memoryStream = new MemoryStream();
StartProcess(processWrapper);
await process.StandardOutput.BaseStream.CopyToAsync(memoryStream, cancellationToken);
await process.StandardOutput.BaseStream.CopyToAsync(memoryStream, cancellationToken).ConfigureAwait(false);
memoryStream.Seek(0, SeekOrigin.Begin);
InternalMediaInfoResult result;
try