aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-09-25 14:39:13 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-09-25 14:39:13 -0400
commitd596053ec7830d89a83723b0ae2f8439c6319f6f (patch)
tree4abe337264e7fe581bf245babf4730906f93c001 /MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs
parent48d7f686eb2212a19ee988c18c39d9fe1027d483 (diff)
rework live stream handling
Diffstat (limited to 'MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs')
-rw-r--r--MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs b/MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs
index 0a9a44641..80b5e357d 100644
--- a/MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs
+++ b/MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs
@@ -24,6 +24,8 @@ namespace MediaBrowser.Api.Playback.Progressive
private long _bytesWritten = 0;
+ public bool AllowEndOfFile = true;
+
public ProgressiveFileCopier(IFileSystem fileSystem, string path, Dictionary<string, string> outputHeaders, TranscodingJob job, ILogger logger, CancellationToken cancellationToken)
{
_fileSystem = fileSystem;
@@ -50,7 +52,7 @@ namespace MediaBrowser.Api.Playback.Progressive
using (var fs = _fileSystem.GetFileStream(_path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, true))
{
- while (eofCount < 15)
+ while (eofCount < 15 || !AllowEndOfFile)
{
var bytesRead = await CopyToAsyncInternal(fs, outputStream, BufferSize, _cancellationToken).ConfigureAwait(false);