diff --git a/gst-libs/gst/vaapi/gstvaapiencoder.c b/gst-libs/gst/vaapi/gstvaapiencoder.c index 4aeccc5b7e..bdb8d9ef49 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder.c @@ -803,8 +803,11 @@ gst_vaapi_encoder_reconfigure_internal (GstVaapiEncoder * encoder) GstVideoInfo *const vip = GST_VAAPI_ENCODER_VIDEO_INFO (encoder); GstVaapiEncoderStatus status; GstVaapiVideoPool *pool; - guint codedbuf_size, target_percentage, quality_level_max = 0; + guint codedbuf_size, target_percentage; guint fps_d, fps_n; +#if VA_CHECK_VERSION(0,36,0) + guint quality_level_max = 0; +#endif fps_d = GST_VIDEO_INFO_FPS_D (vip); fps_n = GST_VIDEO_INFO_FPS_N (vip); diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c index b76ccb63c1..42a05db3a5 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c @@ -2179,8 +2179,10 @@ static gboolean ensure_misc_params (GstVaapiEncoderH264 * encoder, GstVaapiEncPicture * picture) { GstVaapiEncoder *const base_encoder = GST_VAAPI_ENCODER_CAST (encoder); +#if VA_CHECK_VERSION(0,39,1) GstVaapiEncMiscParam *misc; guint num_roi; +#endif if (!gst_vaapi_encoder_ensure_param_control_rate (base_encoder, picture)) return FALSE; @@ -2203,11 +2205,10 @@ ensure_misc_params (GstVaapiEncoderH264 * encoder, GstVaapiEncPicture * picture) goto error_create_packed_sei_hdr; } } - +#if VA_CHECK_VERSION(0,39,1) /* region-of-interest params */ num_roi = base_encoder->roi_regions ? g_list_length (base_encoder->roi_regions) : 0; -#if VA_CHECK_VERSION(0,39,1) if (num_roi > 0) { /* ROI(Region of Interest) params */ VAEncMiscParameterBufferROI *roi_param;