Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoding MediaPlaylist panics with error: index out of range [0] with length 0 #197

Closed
hasc opened this issue Mar 27, 2023 · 2 comments
Closed
Labels

Comments

@hasc
Copy link

hasc commented Mar 27, 2023

Hello,

many thanks for sharing this library!

Since version v0.11.2 decoding a MediaPlaylist panics with the error message: "index out of range [0] with length 0"

Steps to reproduce:

const manifest = `#EXTM3U
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:419978785
#EXT-X-VERSION:3
#EXT-X-KEY:METHOD=NONE
#EXTINF:4,
path/to/segment_419978785.ts
#EXTINF:4,
path/to/segment_419978786.ts
#EXTINF:4,
path/to/segment_419978787.ts
#EXTINF:4,
path/to/segment_419978788.ts
#EXTINF:4,
path/to/segment_419978789.ts
`
_, _, err := m3u8.DecodeFrom(strings.NewReader(manifest), true)

@coder-free
Copy link

go get -u github.com/grafov/m3u8@master
master it fixed.

@grafov grafov added the bug label Apr 9, 2023
@grafov
Copy link
Owner

grafov commented Apr 9, 2023

Thank you. I set up tags properly. Latest version where the bug was fixed is v0.11.3.

@grafov grafov closed this as completed Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants