mirror of
https://github.com/teacat/chaturbate-dvr.git
synced 2025-10-29 16:59:59 +00:00
Return error and retry if m3u8.Playlist is nil
This commit is contained in:
parent
aafd559ce1
commit
e0614cb02c
5
main.go
5
main.go
@ -113,7 +113,10 @@ func parseM3U8Source(url string) (chunks []*m3u8.MediaSegment, wait float64, err
|
||||
|
||||
// Decode the segment table.
|
||||
p, _, _ := m3u8.DecodeFrom(strings.NewReader(body), true)
|
||||
media := p.(*m3u8.MediaPlaylist)
|
||||
media, ok := p.(*m3u8.MediaPlaylist)
|
||||
if !ok {
|
||||
return nil, 3, errInternal
|
||||
}
|
||||
wait = media.TargetDuration / 1.5
|
||||
|
||||
// Ignore the empty segments.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user