m3u8 icon indicating copy to clipboard operation
m3u8 copied to clipboard

set Segment key error

Open Ruk1ng001 opened this issue 1 year ago • 0 comments

I get an error when all segments is nil in file reader.go:

		if state.tagKey {
			p.Segments[p.last()].Key = &Key{state.xkey.Method, state.xkey.URI, state.xkey.IV, state.xkey.Keyformat, state.xkey.Keyformatversions}
			// First EXT-X-KEY may appeared in the header of the playlist and linked to first segment
			// but for convenient playlist generation it also linked as default playlist key
			if p.Key == nil {
				p.Key = state.xkey
			}
			state.tagKey = false
		}

All the segment in p.Segments is nil, so cann't find p.Segments[p.last()].Key.

Ruk1ng001 avatar Sep 13 '23 13:09 Ruk1ng001