From: qydysky Date: Tue, 5 Apr 2022 12:47:45 +0000 (+0800) Subject: 直播流fix X-Git-Tag: v0.5.10~41^2~82 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=57bcd9ff3b04bdc8899563650cabeeed2ce357c6;p=bili_danmu%2F.git 直播流fix --- diff --git a/Reply/F.go b/Reply/F.go index 063a5af..5fc7a29 100644 --- a/Reply/F.go +++ b/Reply/F.go @@ -462,7 +462,7 @@ func Savestreamf() { o := bytes.Index(line, []byte(`EXT-X-MAP:URI="`)) + 15 e := bytes.Index(line[o:], []byte(`"`)) + o m4s_link = string(line[o:e]) - } else if bytes.Contains(line, []byte("EXT-X-BILI-PREFETCH")) { + } else if bytes.Contains(lines[i], []byte("#EXT-X")) { //忽略扩展标签 continue } else if bytes.Contains(line, []byte(".m4s")) { m4s_link = string(line) @@ -499,7 +499,7 @@ func Savestreamf() { if found { offset := m4s_links[i].Offset_line - 1 for i := offset; i < len(lines); i += 1 { - if bytes.Contains(lines[i], []byte("EXT-X-BILI-PREFETCH")) { + if bytes.Contains(lines[i], []byte("#EXT-X")) { //忽略扩展标签 continue } m3u8_file_addition = append(m3u8_file_addition, lines[i]...) @@ -515,7 +515,7 @@ func Savestreamf() { if !found { offset := m4s_links[1].Offset_line - 1 for i := offset; i < len(lines); i += 1 { - if bytes.Contains(lines[i], []byte("EXT-X-BILI-PREFETCH")) { + if bytes.Contains(lines[i], []byte("#EXT-X")) { //忽略扩展标签 continue } m3u8_file_addition = append(m3u8_file_addition, lines[i]...)