GPU (FreeBSD): fix compiling when libdrm is not available

Fix #1820
This commit is contained in:
李通洲
2025-06-26 21:32:46 +08:00
parent addf674621
commit 9832a0e45b
+2
View File
@@ -212,11 +212,13 @@ static const char* detectByPci(const FFGPUOptions* options, FFlist* gpus)
const char* ffDetectGPUImpl(const FFGPUOptions* options, FFlist* gpus)
{
#if FF_HAVE_DRM
if (options->detectionMethod == FF_GPU_DETECTION_METHOD_AUTO)
{
detectByDrm(options, gpus);
if (gpus->length > 0) return NULL;
}
#endif
return detectByPci(options, gpus);
}