Remove ChunkDuration warning (#2346)

ChunkDuration is only used in preview generation, and is already validated there.
This commit is contained in:
WithoutPants 2022-02-25 11:03:41 +11:00 committed by GitHub
parent 4e9a635ed8
commit 7fd8fc8d55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -114,15 +114,12 @@ func (g *GeneratorInfo) configure() error {
return err
}
// #2250 - ensure ChunkCount and ChunkDuration are valid
// #2250 - ensure ChunkCount is valid
if g.ChunkCount < 1 {
logger.Warnf("[generator] Segment count (%d) must be > 0. Using 1 instead.", g.ChunkCount)
g.ChunkCount = 1
}
if g.ChunkDuration < 0.75 {
logger.Warnf("[generator] Segment duration (%f) must be >= 0.75. Using 0.75 instead.", g.ChunkDuration)
g.ChunkDuration = 0.75
}
g.NthFrame = g.NumberOfFrames / g.ChunkCount
return nil