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()
|
||||
api_avail = set()
|
||||
for gpu in gpus:
|
||||
api_avail.update(
|
||||
data['hwaccels']['api_avail'][plat_sys][gpu['vendor']])
|
||||
vendor_apis = data['hwaccels']['api_avail'][plat_sys].get(
|
||||
gpu['vendor'])
|
||||
if vendor_apis:
|
||||
api_avail.update(vendor_apis)
|
||||
hwaccels = [
|
||||
hwaccel for hwaccel in hwaccels if hwaccel['name'] in api_avail]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user