mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Fix a few cases where ffmpeg produces no output (#3161)
* Treat no output from ffmpeg as an error condition * Distinguish file vs. video duration, and use later where appropriate * Check for empty file in generateFile Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
@@ -40,7 +40,7 @@ func (t *GeneratePreviewTask) Start(ctx context.Context) {
|
||||
|
||||
videoChecksum := t.Scene.GetHash(t.fileNamingAlgorithm)
|
||||
|
||||
if err := t.generateVideo(videoChecksum, videoFile.Duration); err != nil {
|
||||
if err := t.generateVideo(videoChecksum, videoFile.VideoStreamDuration); err != nil {
|
||||
logger.Errorf("error generating preview: %v", err)
|
||||
logErrorOutput(err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user