mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Fix last segment never showing on transcode/transmux
This commit is contained in:
parent
2b59a35bf3
commit
050b420f9a
@ -314,6 +314,10 @@ func (ts *Stream) GetIndex() (string, error) {
|
||||
index += fmt.Sprintf("#EXTINF:%.6f\n", ts.file.Keyframes[segment+1]-ts.file.Keyframes[segment])
|
||||
index += fmt.Sprintf("segment-%d.ts\n", segment)
|
||||
}
|
||||
// do not forget to add the last segment between the last keyframe and the end of the file
|
||||
index += fmt.Sprintf("#EXTINF:%.6f\n", float64(ts.file.Info.Duration)-ts.file.Keyframes[len(ts.file.Keyframes)-1])
|
||||
index += fmt.Sprintf("segment-%d.ts\n", len(ts.file.Keyframes)-1)
|
||||
|
||||
index += `#EXT-X-ENDLIST`
|
||||
return index, nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user