vf_misc_vaapi: Add missing return value checks
Parameter buffer creation can fail.
This commit is contained in:
@@ -84,10 +84,9 @@ static int denoise_vaapi_build_filter_params(AVFilterContext *avctx)
|
|||||||
denoise.value = map(ctx->denoise, DENOISE_MIN, DENOISE_MAX,
|
denoise.value = map(ctx->denoise, DENOISE_MIN, DENOISE_MAX,
|
||||||
caps.range.min_value,
|
caps.range.min_value,
|
||||||
caps.range.max_value);
|
caps.range.max_value);
|
||||||
ff_vaapi_vpp_make_param_buffers(avctx, VAProcFilterParameterBufferType,
|
return ff_vaapi_vpp_make_param_buffers(avctx,
|
||||||
&denoise, sizeof(denoise), 1);
|
VAProcFilterParameterBufferType,
|
||||||
|
&denoise, sizeof(denoise), 1);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sharpness_vaapi_build_filter_params(AVFilterContext *avctx)
|
static int sharpness_vaapi_build_filter_params(AVFilterContext *avctx)
|
||||||
@@ -116,11 +115,9 @@ static int sharpness_vaapi_build_filter_params(AVFilterContext *avctx)
|
|||||||
SHARPNESS_MIN, SHARPNESS_MAX,
|
SHARPNESS_MIN, SHARPNESS_MAX,
|
||||||
caps.range.min_value,
|
caps.range.min_value,
|
||||||
caps.range.max_value);
|
caps.range.max_value);
|
||||||
ff_vaapi_vpp_make_param_buffers(avctx,
|
return ff_vaapi_vpp_make_param_buffers(avctx,
|
||||||
VAProcFilterParameterBufferType,
|
VAProcFilterParameterBufferType,
|
||||||
&sharpness, sizeof(sharpness), 1);
|
&sharpness, sizeof(sharpness), 1);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int misc_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
|
static int misc_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
|
||||||
|
Reference in New Issue
Block a user