only use vaapi when feature is enabled
All checks were successful
Trigger quay.io Webhook / run (push) Successful in 4s
All checks were successful
Trigger quay.io Webhook / run (push) Successful in 4s
This commit is contained in:
parent
5e1f5e8829
commit
d5bb7a4bdc
2 changed files with 2 additions and 1 deletions
|
@ -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 = []
|
||||||
|
|
|
@ -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");
|
||||||
|
|
Loading…
Reference in a new issue