mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Add short sprite error logging (#2129)
This commit is contained in:
committed by
GitHub
parent
66dd239732
commit
d94e4f9a5b
@@ -1,6 +1,7 @@
|
||||
package manager
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"image"
|
||||
"image/color"
|
||||
@@ -33,6 +34,12 @@ func NewSpriteGenerator(videoFile ffmpeg.VideoFile, videoChecksum string, imageO
|
||||
if !exists {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// FFMPEG bombs out if we try to request 89 snapshots from a 2 second video
|
||||
if videoFile.Duration < 3 {
|
||||
return nil, errors.New("video too short to create sprite")
|
||||
}
|
||||
|
||||
generator, err := newGeneratorInfo(videoFile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user