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 ...