-
Notifications
You must be signed in to change notification settings - Fork 309
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
m3u8.DecodeFrom create playlistMedia with 1024 Segments #5
Comments
This really is an issue... Also len(Segments) == 1024 when you only have 3 segments... so in for-range loop you need to check nil values... |
MediaPlaylist.Segments is a slice. DecodeFrom auto-initializes the slice to a length of 1024: https://github.com/grafov/m3u8/blob/master/reader.go#L154 Instead use MediaPlaylist.Count method to get the current number of segments in the playlist. See https://github.com/grafov/m3u8/blob/master/writer.go#L504 |
I have the same question. |
If there's additional APIs people want, let me know and I should be able to implement. We've had similar requirements, but using |
#70 adds the ability for playlist to auto extend beyond 1024 segments and exposes winsize. |
https://github.com/grafov/m3u8/blob/master/reader.go#L151
I have mediaPlaylistFile with 1203 segments (c_00000000.ts - c_00001202.ts).
But when I do: m3u8.DecodeFrom I got len(playlistMedia.Segments) == 1024!:
How can I iterate over more than 1024 segments?
How can I get total duration?
How can I get full URI slice?
The text was updated successfully, but these errors were encountered: