胡斌

add "#EXT-X-PLAYLIST-TYPE:VOD","#EXT-X-MEDIA-SEQUENCE:0",and remove "#EXT-X-DISC…

…ONTINUITY" at the head of total.m3u8
@@ -789,6 +789,8 @@ int SrsHlsMuxer::segment_close(string log_desc) @@ -789,6 +789,8 @@ int SrsHlsMuxer::segment_close(string log_desc)
789 ss << "#EXTM3U" << SRS_CONSTS_LF << "#EXT-X-VERSION:3" 789 ss << "#EXTM3U" << SRS_CONSTS_LF << "#EXT-X-VERSION:3"
790 << SRS_CONSTS_LF << "#EXT-X-ALLOW-CACHE:YES" 790 << SRS_CONSTS_LF << "#EXT-X-ALLOW-CACHE:YES"
791 << SRS_CONSTS_LF; 791 << SRS_CONSTS_LF;
  792 + ss << "#EXT-X-PLAYLIST-TYPE:VOD" << SRS_CONSTS_LF;
  793 + ss << "#EXT-X-MEDIA-SEQUENCE:0" << SRS_CONSTS_LF;
792 srs_verbose("write m3u8 header success."); 794 srs_verbose("write m3u8 header success.");
793 795
794 } else { 796 } else {
@@ -810,9 +812,11 @@ int SrsHlsMuxer::segment_close(string log_desc) @@ -810,9 +812,11 @@ int SrsHlsMuxer::segment_close(string log_desc)
810 if( m3u8_total_endlist_saved ){ 812 if( m3u8_total_endlist_saved ){
811 erase_last_endlist = true; 813 erase_last_endlist = true;
812 } 814 }
813 - // #EXT-X-DISCONTINUITY\n  
814 - ss << "#EXT-X-DISCONTINUITY" << SRS_CONSTS_LF;  
815 - srs_verbose("write m3u8 segment discontinuity success."); 815 + if (currentSeg->sequence_no != 0) {
  816 + // #EXT-X-DISCONTINUITY\n
  817 + ss << "#EXT-X-DISCONTINUITY" << SRS_CONSTS_LF;
  818 + srs_verbose("write m3u8 segment discontinuity success.");
  819 + }
816 } 820 }
817 821
818 // "#EXTINF:4294967295.208,\n" 822 // "#EXTINF:4294967295.208,\n"