diff --git a/gst-libs/gst/vaapi/gstvaapicompat.h b/gst-libs/gst/vaapi/gstvaapicompat.h index 1e5a302503..493cadc36d 100644 --- a/gst-libs/gst/vaapi/gstvaapicompat.h +++ b/gst-libs/gst/vaapi/gstvaapicompat.h @@ -37,6 +37,12 @@ #define vaAssociateSubpicture vaAssociateSubpicture2 #endif +#if VA_CHECK_VERSION(1,0,0) +#define VA_ROI_RC_QP_DELTA_SUPPORT(x) x->bits.roi_rc_qp_delta_support +#else +#define VA_ROI_RC_QP_DELTA_SUPPORT(x) x->bits.roi_rc_qp_delat_support +#endif + /* Compatibility glue with VA-API 0.34 */ #if VA_CHECK_VERSION(0,34,0) # include diff --git a/gst-libs/gst/vaapi/gstvaapicontext.c b/gst-libs/gst/vaapi/gstvaapicontext.c index 2aadd736f4..2312878167 100644 --- a/gst-libs/gst/vaapi/gstvaapicontext.c +++ b/gst-libs/gst/vaapi/gstvaapicontext.c @@ -317,10 +317,10 @@ config_create (GstVaapiContext * context) goto cleanup; roi_config = (VAConfigAttribValEncROI *) & value; if (roi_config->bits.num_roi_regions != config->roi_num_supported || - roi_config->bits.roi_rc_qp_delat_support == 0) { + VA_ROI_RC_QP_DELTA_SUPPORT (roi_config) == 0) { GST_ERROR ("ROI unsupported - number of regions supported: %d" " ROI delta QP: %d", roi_config->bits.num_roi_regions, - roi_config->bits.roi_rc_qp_delat_support); + VA_ROI_RC_QP_DELTA_SUPPORT (roi_config)); goto cleanup; } attrib->value = value; diff --git a/gst-libs/gst/vaapi/gstvaapiencoder.c b/gst-libs/gst/vaapi/gstvaapiencoder.c index d761bfa242..0a91b2e5c2 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder.c @@ -657,7 +657,7 @@ get_roi_capability (GstVaapiEncoder * encoder, guint * num_roi_supported) roi_config = (VAConfigAttribValEncROI *) & value; if (roi_config->bits.num_roi_regions == 0 || - roi_config->bits.roi_rc_qp_delat_support == 0) + VA_ROI_RC_QP_DELTA_SUPPORT (roi_config) == 0) return FALSE; GST_INFO ("Support for ROI - number of regions supported: %d",