Transcoder: Prevent Chapters Parsing from failiing when no chapters (#495)

This commit is contained in:
Arthur Jamet 2024-05-14 09:15:38 +02:00 committed by GitHub
parent c8402780f3
commit b6e0b5b328
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -338,7 +338,7 @@ func chapterTimeIsValid(chapterTime string) bool {
}
func getChapters(chapters_begin uint32, chapters_end uint32, mi *mediainfo.File, duration float32) []Chapter {
chapterCount := max(chapters_end-chapters_begin, 1)
chapterCount := max(chapters_end-chapters_begin, 0)
chapterIterationCount := chapterCount
chapters := make([]Chapter, chapterCount)
chapterIndex := 0