浏览代码

fix hls allow cache name

Luke Pulverenti 12 年之前
父节点
当前提交
e5faa92a18
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      MediaBrowser.Api/Playback/Hls/BaseHlsService.cs

+ 5 - 1
MediaBrowser.Api/Playback/Hls/BaseHlsService.cs

@@ -132,9 +132,13 @@ namespace MediaBrowser.Api.Playback.Hls
             // It's considered live while still encoding (EVENT). Once the encoding has finished, it's video on demand (VOD).
             // It's considered live while still encoding (EVENT). Once the encoding has finished, it's video on demand (VOD).
             var playlistType = fileText.IndexOf("#EXT-X-ENDLIST", StringComparison.OrdinalIgnoreCase) == -1 ? "EVENT" : "VOD";
             var playlistType = fileText.IndexOf("#EXT-X-ENDLIST", StringComparison.OrdinalIgnoreCase) == -1 ? "EVENT" : "VOD";
 
 
+            // fix this to make the media stream validator happy
+            // https://ffmpeg.org/trac/ffmpeg/ticket/2228
+            fileText = fileText.Replace("#EXT-X-ALLOWCACHE", "#EXT-X-ALLOW-CACHE");
+
             // Add event type at the top
             // Add event type at the top
             fileText = fileText.Replace("#EXT-X-ALLOW-CACHE", "#EXT-X-PLAYLIST-TYPE:" + playlistType + Environment.NewLine + "#EXT-X-ALLOWCACHE");
             fileText = fileText.Replace("#EXT-X-ALLOW-CACHE", "#EXT-X-PLAYLIST-TYPE:" + playlistType + Environment.NewLine + "#EXT-X-ALLOWCACHE");
-
+    
             return fileText;
             return fileText;
         }
         }