mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 16:34:02 +01:00
Add short sprite error logging (#2129)
This commit is contained in:
parent
66dd239732
commit
d94e4f9a5b
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue