fix: accessing Standard* of a Process requires manually disposing them afterwards (#10125)

This commit is contained in:
Claus Vium
2023-08-20 20:06:57 +02:00
committed by GitHub
parent 260680d727
commit 956e3dab43
6 changed files with 56 additions and 48 deletions

View File

@@ -511,7 +511,8 @@ namespace MediaBrowser.MediaEncoding.Encoder
using (var processWrapper = new ProcessWrapper(process, this))
{
StartProcess(processWrapper);
await process.StandardOutput.BaseStream.CopyToAsync(memoryStream, cancellationToken).ConfigureAwait(false);
using var reader = process.StandardOutput;
await reader.BaseStream.CopyToAsync(memoryStream, cancellationToken).ConfigureAwait(false);
memoryStream.Seek(0, SeekOrigin.Begin);
InternalMediaInfoResult result;
try