OSDN Git Service

hwcontext_vaapi: Try the first render node as the default DRM device
authorMark Thompson <sw@jkqxz.net>
Thu, 28 Jul 2016 22:28:30 +0000 (23:28 +0100)
committerMark Thompson <sw@jkqxz.net>
Sun, 13 Nov 2016 20:39:49 +0000 (20:39 +0000)
commit8d47d8407569aade0c0d564600919349789dc38b
tree891595b71ae044a7369f2d9f1dfe97d38673556d
parent1a359e53418ff15b1c9b1e03c05b160f01e1ce0f
hwcontext_vaapi: Try the first render node as the default DRM device

If no string argument is supplied when av_hwdevice_ctx_create() is
called to create a VAAPI device, we currently only try the default
X11 display (that is, $DISPLAY) to find a device, and will therefore
fail in the absence of an X server to connect to.  Change the logic
to also look for a device via the first DRM render node (that is,
"/dev/dri/renderD128"), which is probably the right thing to use in
most simple configurations which only have one DRM device.

(cherry picked from commit 121f34d5f0c8d7d376829a467590fbbe4c228f4f)
libavutil/hwcontext_vaapi.c