From d7454134c98a356e4b3efca27926f78300d75b1e Mon Sep 17 00:00:00 2001 From: wenjiegit <740936897@qq.com> Date: Fri, 4 Jul 2014 09:53:50 +0800 Subject: [PATCH] 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. --- trunk/src/app/srs_app_hls.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trunk/src/app/srs_app_hls.cpp b/trunk/src/app/srs_app_hls.cpp index c93bb0276..ac36be019 100644 --- a/trunk/src/app/srs_app_hls.cpp +++ b/trunk/src/app/srs_app_hls.cpp @@ -825,7 +825,10 @@ int SrsHlsMuxer::_refresh_m3u8(int& fd, string m3u8_file) 0x23, 0x45, 0x58, 0x54, 0x4d, 0x33, 0x55, 0xa, // #EXT-X-VERSION:3\n 0x23, 0x45, 0x58, 0x54, 0x2d, 0x58, 0x2d, 0x56, 0x45, 0x52, - 0x53, 0x49, 0x4f, 0x4e, 0x3a, 0x33, 0xa + 0x53, 0x49, 0x4f, 0x4e, 0x3a, 0x33, 0xa, + // #EXT-X-ALLOW-CACHE:NO + 0x23, 0x45, 0x58, 0x54, 0x2d, 0x58, 0x2d, 0x41, 0x4c, 0x4c, + 0x4f, 0x57, 0x2d, 0x43, 0x41, 0x43, 0x48, 0x45, 0x3a, 0x4e, 0x4f, 0x0a }; if (::write(fd, header, sizeof(header)) != sizeof(header)) { ret = ERROR_HLS_WRITE_FAILED;