Detect: Fix handling of GPUs not listed in hwaccel APIs

For example, Windows remote desktop
This commit is contained in:
Ross Patterson 2019-08-12 01:07:40 -07:00
parent 89464c8f82
commit 96d4d490b1

View File

@ -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]