diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-09-03 10:37:15 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-09-03 10:37:15 -0400 |
| commit | da0c386853e8e34e5c6d729d1df47015bcd03959 (patch) | |
| tree | f8c97fd78379e07a69b381211b3f1e7aeb593e2e | |
| parent | 2e43a0746c37396946330107bdb158e80bc4f22b (diff) | |
padded bitrate for hls
| -rw-r--r-- | MediaBrowser.Api/Playback/Hls/BaseHlsService.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs index 3204951de..7813c2b7e 100644 --- a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs @@ -140,8 +140,11 @@ namespace MediaBrowser.Api.Playback.Hls builder.AppendLine("#EXTM3U"); + // Pad a little to satisfy the apple hls validator + var paddedBitrate = Convert.ToInt32(bitrate * 1.05); + // Main stream - builder.AppendLine("#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=" + bitrate.ToString(UsCulture)); + builder.AppendLine("#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=" + paddedBitrate.ToString(UsCulture)); var playlistUrl = "hls/" + Path.GetFileName(firstPlaylist).Replace(".m3u8", "/stream.m3u8"); builder.AppendLine(playlistUrl); |
