diff options
-rw-r--r-- | src/gen6_mfd.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gen6_mfd.c b/src/gen6_mfd.c index cb9713aa..bcc455be 100644 --- a/src/gen6_mfd.c +++ b/src/gen6_mfd.c @@ -1619,10 +1619,11 @@ gen6_mfd_vc1_pred_pipe_state(VADriverContextP ctx, if (gen6_mfd_context->reference_surface[0].surface_id != VA_INVALID_ID) { if (picture_type == 1 || picture_type == 2) { /* P/B picture */ struct gen6_vc1_surface *gen6_vc1_surface = gen6_mfd_context->reference_surface[0].obj_surface->private_data; - - intensitycomp_single_fwd = gen6_vc1_surface->intensity_compensation; - luma_scale1 = gen6_vc1_surface->luma_scale; - luma_shift1 = gen6_vc1_surface->luma_shift; + if (gen6_vc1_surface) { + intensitycomp_single_fwd = gen6_vc1_surface->intensity_compensation; + luma_scale1 = gen6_vc1_surface->luma_scale; + luma_shift1 = gen6_vc1_surface->luma_shift; + } } } |