Removed memoryStream
This commit is contained in:
parent
ac7636ea1e
commit
d3e8834e80
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
@ -123,10 +123,14 @@ namespace Jellyfin.Api.Helpers
|
||||||
state.Dispose();
|
state.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
var memoryStream = new MemoryStream();
|
await new ProgressiveFileCopier(outputPath, job, transcodingJobHelper, CancellationToken.None)
|
||||||
await new ProgressiveFileCopier(outputPath, job, transcodingJobHelper, CancellationToken.None).WriteToAsync(memoryStream, CancellationToken.None).ConfigureAwait(false);
|
.WriteToAsync(httpContext.Response.Body, CancellationToken.None).ConfigureAwait(false);
|
||||||
memoryStream.Position = 0;
|
return new FileStreamResult(httpContext.Response.Body, contentType);
|
||||||
return new FileStreamResult(memoryStream, contentType);
|
|
||||||
|
// var memoryStream = new MemoryStream();
|
||||||
|
// await new ProgressiveFileCopier(outputPath, job, transcodingJobHelper, CancellationToken.None).WriteToAsync(memoryStream, CancellationToken.None).ConfigureAwait(false);
|
||||||
|
// memoryStream.Position = 0;
|
||||||
|
// return new FileStreamResult(memoryStream, contentType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user