only use vaapi when feature is enabled
All checks were successful
Trigger quay.io Webhook / run (push) Successful in 4s

This commit is contained in:
Dominic 2024-07-08 13:18:26 +02:00
parent 5e1f5e8829
commit d5bb7a4bdc
Signed by: msrd0
GPG key ID: AAF7C8430CA3345D
2 changed files with 2 additions and 1 deletions

View file

@ -24,3 +24,4 @@ toml = { package = "basic-toml", version = "0.1.4" }
[features] [features]
default = ["mem_limit"] default = ["mem_limit"]
mem_limit = [] mem_limit = []
vaapi = []

View file

@ -322,7 +322,7 @@ impl Ffmpeg {
// initialise a vaapi device if one exists // initialise a vaapi device if one exists
let vaapi_device: PathBuf = "/dev/dri/renderD128".into(); let vaapi_device: PathBuf = "/dev/dri/renderD128".into();
let vaapi = vaapi_device.exists(); let vaapi = cfg!(feature = "vaapi") && vaapi_device.exists();
if vaapi && venc { if vaapi && venc {
if vdec { if vdec {
cmd.arg("-hwaccel").arg("vaapi"); cmd.arg("-hwaccel").arg("vaapi");