From 21d7b338e2d4be914896d698354fe4785b880ea0 Mon Sep 17 00:00:00 2001 From: fritsch Date: Mon, 27 Oct 2014 21:54:19 +0100 Subject: [PATCH] i965pp: Don't assert --- src/i965_post_processing.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c index ddb553e..480dbaf 100755 --- a/src/i965_post_processing.c +++ b/src/i965_post_processing.c @@ -3813,11 +3813,16 @@ gen7_pp_nv12_dndi_initialize(VADriverContextP ctx, struct i965_post_processing_c /* Copy previously generated field */ if (dndi_ctx->copy_out_previous) { obj_surface = dndi_ctx->frame_store[DNDI_FRAME_OUT_PREVIOUS].obj_surface; - assert(obj_surface && obj_surface != dst_obj_surface); - assert(obj_surface->base.id != dst_obj_surface->base.id); - status = vpp_surface_convert(ctx, obj_surface, dst_obj_surface); - if (status == VA_STATUS_SUCCESS) + if ((obj_surface && obj_surface != dst_obj_surface) && + (obj_surface->base.id != dst_obj_surface->base.id)) + { + status = vpp_surface_convert(ctx, obj_surface, dst_obj_surface); + if (status == VA_STATUS_SUCCESS) status = VA_STATUS_SUCCESS_1; + } + else + status = VA_STATUS_ERROR_INVALID_SURFACE; + return status; } -- 1.9.1