Skip to content

msdk: Don't use VA_RT_FORMAT_YUV420_10 if it's undefined

Just tried to build the MSDK plugins with old libva (api 1.0.0) and it failed with the following.

../sys/msdk/gstmsdkallocator_libva.c: In function ‘gst_msdk_frame_alloc’:
../sys/msdk/gstmsdkallocator_libva.c:99:16: error: ‘VA_RT_FORMAT_YUV420_10’ undeclared (first use in this function)
       format = VA_RT_FORMAT_YUV420_10;
                ^
../sys/msdk/gstmsdkallocator_libva.c:99:16: note: each undeclared identifier is reported only once for each function it appears in
../sys/msdk/gstmsdkallocator_libva.c: In function ‘gst_msdk_export_dmabuf_to_vasurface’:
../sys/msdk/gstmsdkallocator_libva.c:474:19: error: ‘VA_RT_FORMAT_YUV420_10’ undeclared (first use in this function)
       va_chroma = VA_RT_FORMAT_YUV420_10;
                   ^

The minimum required version for VA_RT_FORMAT_YUV420_10 seems to VA_API_VERSION >= 1.2.0

Edited by Yeongjin Jeong

Merge request reports