mirror of
https://github.com/kkroening/ffmpeg-python.git
synced 2025-08-07 18:39:47 +08:00
Detect: Fix handling of GPUs not listed in hwaccel APIs
For example, Windows remote desktop
This commit is contained in:
parent
89464c8f82
commit
96d4d490b1
@ -166,8 +166,10 @@ def detect_hwaccels(hwaccels=None, cmd='ffmpeg'):
|
|||||||
gpus = detect_gpus()
|
gpus = detect_gpus()
|
||||||
api_avail = set()
|
api_avail = set()
|
||||||
for gpu in gpus:
|
for gpu in gpus:
|
||||||
api_avail.update(
|
vendor_apis = data['hwaccels']['api_avail'][plat_sys].get(
|
||||||
data['hwaccels']['api_avail'][plat_sys][gpu['vendor']])
|
gpu['vendor'])
|
||||||
|
if vendor_apis:
|
||||||
|
api_avail.update(vendor_apis)
|
||||||
hwaccels = [
|
hwaccels = [
|
||||||
hwaccel for hwaccel in hwaccels if hwaccel['name'] in api_avail]
|
hwaccel for hwaccel in hwaccels if hwaccel['name'] in api_avail]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user