Update srs_app_hls.cpp
for hls, srs should not allow player to cache m3u8 list. add #EXT-X-ALLOW-CACHE:NO to m3u8 file.
正在显示
1 个修改的文件
包含
4 行增加
和
1 行删除
@@ -825,7 +825,10 @@ int SrsHlsMuxer::_refresh_m3u8(int& fd, string m3u8_file) | @@ -825,7 +825,10 @@ int SrsHlsMuxer::_refresh_m3u8(int& fd, string m3u8_file) | ||
825 | 0x23, 0x45, 0x58, 0x54, 0x4d, 0x33, 0x55, 0xa, | 825 | 0x23, 0x45, 0x58, 0x54, 0x4d, 0x33, 0x55, 0xa, |
826 | // #EXT-X-VERSION:3\n | 826 | // #EXT-X-VERSION:3\n |
827 | 0x23, 0x45, 0x58, 0x54, 0x2d, 0x58, 0x2d, 0x56, 0x45, 0x52, | 827 | 0x23, 0x45, 0x58, 0x54, 0x2d, 0x58, 0x2d, 0x56, 0x45, 0x52, |
828 | - 0x53, 0x49, 0x4f, 0x4e, 0x3a, 0x33, 0xa | 828 | + 0x53, 0x49, 0x4f, 0x4e, 0x3a, 0x33, 0xa, |
829 | + // #EXT-X-ALLOW-CACHE:NO | ||
830 | + 0x23, 0x45, 0x58, 0x54, 0x2d, 0x58, 0x2d, 0x41, 0x4c, 0x4c, | ||
831 | + 0x4f, 0x57, 0x2d, 0x43, 0x41, 0x43, 0x48, 0x45, 0x3a, 0x4e, 0x4f, 0x0a | ||
829 | }; | 832 | }; |
830 | if (::write(fd, header, sizeof(header)) != sizeof(header)) { | 833 | if (::write(fd, header, sizeof(header)) != sizeof(header)) { |
831 | ret = ERROR_HLS_WRITE_FAILED; | 834 | ret = ERROR_HLS_WRITE_FAILED; |
-
请 注册 或 登录 后发表评论