From b6e0b5b3284ab388b13a219a67c71cf64eedb29f Mon Sep 17 00:00:00 2001 From: Arthur Jamet <60505370+Arthi-chaud@users.noreply.github.com> Date: Tue, 14 May 2024 09:15:38 +0200 Subject: [PATCH] Transcoder: Prevent Chapters Parsing from failiing when no chapters (#495) --- transcoder/src/info.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transcoder/src/info.go b/transcoder/src/info.go index 5d30b028..22254bde 100644 --- a/transcoder/src/info.go +++ b/transcoder/src/info.go @@ -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