Andrew, I ran out of time today but will test the 2 submitted vaapi patches, although I only have 1 device, just to make sure single device works as expected still (which I am sure it does, but I like to verify whatever I can).

On Sat, Aug 26, 2023 at 1:55 AM Andrew Randrianasulu <randrianasulu@gmail.com> wrote:
Because I have this  dual-gpu laptop with intel and radeon (r600)
decoding devices I tried to get second (mesa/r600) device going but
init failed .. I looked into decoding example:


https://gist.github.com/kajott/d1b29c613be30893c855621edd1f212e

and created attached patch

now you can select your specific device with env variable:

CIN_DRM_DEC=/dev/dri/renderD129 DRI_PRIME=1 LIBVA_DRIVER_NAME=r600  bin/cin

in theory same treatment can be applied (with different variable name)
 to second instance of av_hwdevice_ctx_create (in hw encoder init) but
I have no device to test it ...