diff options
author | Xu Guangxin <guangxin.xu@intel.com> | 2018-11-10 13:55:40 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2018-11-21 13:34:42 +0800 |
commit | 4f8fe64e513ecc461e03e9115315a1459a4684dd (patch) | |
tree | 7f92aaf5079bbce45162b05a427e59d609aef7e1 | |
parent | dc20b6405a53084d76e9a1255569f4f55b66562e (diff) | |
download | libva-intel-driver-4f8fe64e513ecc461e03e9115315a1459a4684dd.tar.gz |
gen75_proc_picture: check return value from gen75_vpp_vebox
gen75_vpp_vebox will check many things like invalid param, unsupported features.
Better check the return value
-rw-r--r-- | src/gen75_picture_process.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gen75_picture_process.c b/src/gen75_picture_process.c index 78ee0a32..8eae208d 100644 --- a/src/gen75_picture_process.c +++ b/src/gen75_picture_process.c @@ -327,7 +327,9 @@ gen75_proc_picture(VADriverContextP ctx, proc_ctx->surface_render_output_object = stage1_dst_surf; } - gen75_vpp_vebox(ctx, proc_ctx); + status = gen75_vpp_vebox(ctx, proc_ctx); + if (status != VA_STATUS_SUCCESS) + goto error; } if ((vpp_stage3 == 1) && (vpp_stage2 == 1)) { @@ -388,7 +390,9 @@ gen75_proc_picture(VADriverContextP ctx, filter->type == VAProcFilterSkinToneEnhancement || filter->type == VAProcFilterSharpening || filter->type == VAProcFilterColorBalance) { - gen75_vpp_vebox(ctx, proc_ctx); + status = gen75_vpp_vebox(ctx, proc_ctx); + if (status != VA_STATUS_SUCCESS) + goto error; } } else if (pipeline_param->num_filters >= 2) { unsigned int i = 0; @@ -413,7 +417,9 @@ gen75_proc_picture(VADriverContextP ctx, assert(0); } } - gen75_vpp_vebox(ctx, proc_ctx); + status = gen75_vpp_vebox(ctx, proc_ctx); + if (status != VA_STATUS_SUCCESS) + goto error; } } @@ -431,7 +437,9 @@ gen75_proc_picture(VADriverContextP ctx, proc_ctx->surface_render_output_object = obj_dst_surf; } - gen75_vpp_vebox(ctx, proc_ctx); + status = gen75_vpp_vebox(ctx, proc_ctx); + if (status != VA_STATUS_SUCCESS) + goto error; } if (num_tmp_surfaces) |