From: Xiang, Haihao Date: Wed, 7 Apr 2010 09:28:52 +0000 (+0800) Subject: i965_drv_video: fix an assertion X-Git-Tag: libva-1.0.3~3^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0f6802397d6e1ad6543d72a90c11558d2ff7dcfe;p=profile%2Fivi%2Flibva.git i965_drv_video: fix an assertion --- diff --git a/i965_drv_video/i965_avc_bsd.c b/i965_drv_video/i965_avc_bsd.c index 80d26d4..1ac0c3e 100644 --- a/i965_drv_video/i965_avc_bsd.c +++ b/i965_drv_video/i965_avc_bsd.c @@ -443,21 +443,26 @@ i965_avc_bsd_buf_base_state(VADriverContextP ctx, obj_surface = SURFACE(va_pic->picture_id); assert(obj_surface); avc_bsd_surface = obj_surface->private_data; - assert(avc_bsd_surface); - assert(avc_bsd_surface->direct_mv_flag != -1); - - OUT_BCS_RELOC(ctx, avc_bsd_surface->direct_mv_wr_top_bo, - I915_GEM_DOMAIN_INSTRUCTION, 0, - 0); + + if (avc_bsd_surface == NULL) { + OUT_BCS_BATCH(ctx, 0); + OUT_BCS_BATCH(ctx, 0); + } else { + assert(avc_bsd_surface->direct_mv_flag != -1); - if (avc_bsd_surface->direct_mv_flag == 1) - OUT_BCS_RELOC(ctx, avc_bsd_surface->direct_mv_wr_bottom_bo, - I915_GEM_DOMAIN_INSTRUCTION, 0, - 0); - else OUT_BCS_RELOC(ctx, avc_bsd_surface->direct_mv_wr_top_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0); + + if (avc_bsd_surface->direct_mv_flag == 1) + OUT_BCS_RELOC(ctx, avc_bsd_surface->direct_mv_wr_bottom_bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + 0); + else + OUT_BCS_RELOC(ctx, avc_bsd_surface->direct_mv_wr_top_bo, + I915_GEM_DOMAIN_INSTRUCTION, 0, + 0); + } } else { OUT_BCS_BATCH(ctx, 0); OUT_BCS_BATCH(ctx, 0);