diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-03-17 17:02:54 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-03-17 17:02:54 -0400 |
| commit | cafc8356b202932f58d902a861bfbc3181b8e0f9 (patch) | |
| tree | edcfb082a36e7b029f12f1f11edf0649e10f1b7e | |
| parent | f251fd5abf9de16cdd427145ceeb4c2284c4a432 (diff) | |
hls fixes
| -rw-r--r-- | MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs | 13 | ||||
| -rw-r--r-- | MediaBrowser.Api/Playback/StreamState.cs | 2 |
2 files changed, 9 insertions, 6 deletions
diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs index 7fe8a08c7..054bef1dd 100644 --- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs @@ -290,12 +290,15 @@ namespace MediaBrowser.Api.Playback.Hls { using (var reader = new StreamReader(fileStream)) { - var text = await reader.ReadToEndAsync().ConfigureAwait(false); - - // If it appears in the playlist, it's done - if (text.IndexOf(segmentFilename, StringComparison.OrdinalIgnoreCase) != -1) + while (!reader.EndOfStream) { - return GetSegmentResult(segmentPath, segmentIndex, segmentLength, transcodingJob); + var text = await reader.ReadLineAsync().ConfigureAwait(false); + + // If it appears in the playlist, it's done + if (text.IndexOf(segmentFilename, StringComparison.OrdinalIgnoreCase) != -1) + { + return GetSegmentResult(segmentPath, segmentIndex, segmentLength, transcodingJob); + } } } } diff --git a/MediaBrowser.Api/Playback/StreamState.cs b/MediaBrowser.Api/Playback/StreamState.cs index 6bbcef591..aa382ba43 100644 --- a/MediaBrowser.Api/Playback/StreamState.cs +++ b/MediaBrowser.Api/Playback/StreamState.cs @@ -66,7 +66,7 @@ namespace MediaBrowser.Api.Playback public string LiveTvStreamId { get; set; } public int SegmentLength = 3; - public bool EnableGenericHlsSegmenter; + public bool EnableGenericHlsSegmenter = false; public int HlsListSize { get |
