summaryrefslogtreecommitdiff
path: root/src/i965_post_processing.c
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2012-04-19 11:24:06 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2012-04-19 11:24:06 +0800
commita8db0b5e7eb43ac7764c2d0aa7065da80412efa0 (patch)
treea106073fcc01ae459f9e34cd22393933e0e037d4 /src/i965_post_processing.c
parent7564f63ce8498e484a127e1776f6335218ef2126 (diff)
downloadvaapi-intel-driver-a8db0b5e7eb43ac7764c2d0aa7065da80412efa0.tar.gz
vaapi-intel-driver-a8db0b5e7eb43ac7764c2d0aa7065da80412efa0.tar.bz2
vaapi-intel-driver-a8db0b5e7eb43ac7764c2d0aa7065da80412efa0.zip
Don't call VPP if the kernel isn't ready.
This avoids segment fault in VPP Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Diffstat (limited to 'src/i965_post_processing.c')
-rw-r--r--src/i965_post_processing.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c
index c0ce399..8708068 100644
--- a/src/i965_post_processing.c
+++ b/src/i965_post_processing.c
@@ -4040,8 +4040,10 @@ i965_proc_picture(VADriverContextP ctx,
VAProcFilterParameterBufferBase *filter_param = (VAProcFilterParameterBufferBase *)obj_buffer->buffer_store->buffer;
VAProcFilterType filter_type = filter_param->type;
VASurfaceID out_surface_id = VA_INVALID_ID;
+ int kernel_index = procfilter_to_pp_flag[filter_type];
- if (procfilter_to_pp_flag[filter_type] != PP_NULL) {
+ if (kernel_index != PP_NULL &&
+ proc_context->pp_context.pp_modules[kernel_index].kernel.bo != NULL) {
status = i965_CreateSurfaces(ctx,
in_width,
in_height,
@@ -4059,7 +4061,7 @@ i965_proc_picture(VADriverContextP ctx,
&src_rect,
&dst_surface,
&src_rect,
- procfilter_to_pp_flag[filter_type],
+ kernel_index,
filter_param);
if (status == VA_STATUS_SUCCESS) {