mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +01:00
[hwaccel] increase timeout, fix formatting (#6328)
Thanks to @Gykes for helping find the formatting error
This commit is contained in:
parent
b3da730a05
commit
a3ed381901
1 changed files with 2 additions and 2 deletions
|
|
@ -69,7 +69,7 @@ func (f *FFMpeg) InitHWSupport(ctx context.Context) {
|
||||||
args = args.Output("-")
|
args = args.Output("-")
|
||||||
|
|
||||||
// #6064 - add timeout to context to prevent hangs
|
// #6064 - add timeout to context to prevent hangs
|
||||||
const hwTestTimeoutSecondsDefault = 1
|
const hwTestTimeoutSecondsDefault = 10
|
||||||
hwTestTimeoutSeconds := hwTestTimeoutSecondsDefault * time.Second
|
hwTestTimeoutSeconds := hwTestTimeoutSecondsDefault * time.Second
|
||||||
|
|
||||||
// allow timeout to be overridden with environment variable
|
// allow timeout to be overridden with environment variable
|
||||||
|
|
@ -90,7 +90,7 @@ func (f *FFMpeg) InitHWSupport(ctx context.Context) {
|
||||||
|
|
||||||
if err := cmd.Run(); err != nil {
|
if err := cmd.Run(); err != nil {
|
||||||
if testCtx.Err() != nil {
|
if testCtx.Err() != nil {
|
||||||
logger.Debugf("[InitHWSupport] Codec %s test timed out after %d seconds", codec, hwTestTimeoutSeconds)
|
logger.Debugf("[InitHWSupport] Codec %s test timed out after %s", codec, hwTestTimeoutSeconds)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue