diff options
author | Xiang, Haihao <haihao.xiang@intel.com> | 2013-09-29 13:11:10 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2013-11-13 15:28:04 +0800 |
commit | c68c6a0c57555acc1e3aa3f4320d1254f45bdc21 (patch) | |
tree | 8ea996cddf482b6438ff657533d0c20385b92bb8 | |
parent | 34de629665bed1be2413ff503ed12c6e189cb0d5 (diff) | |
download | libva-intel-driver-c68c6a0c57555acc1e3aa3f4320d1254f45bdc21.tar.gz libva-intel-driver-c68c6a0c57555acc1e3aa3f4320d1254f45bdc21.tar.bz2 libva-intel-driver-c68c6a0c57555acc1e3aa3f4320d1254f45bdc21.zip |
Check the reference surface id against VA_INVALID_SURFACE
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit 0c2def319f52bdb222e5480d81feea486cbf3e11)
-rw-r--r-- | src/gen6_mfc_common.c | 4 | ||||
-rw-r--r-- | src/gen6_vme.c | 4 | ||||
-rw-r--r-- | src/gen75_vme.c | 4 | ||||
-rw-r--r-- | src/gen7_vme.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/gen6_mfc_common.c b/src/gen6_mfc_common.c index 88a8d61..d66f4c5 100644 --- a/src/gen6_mfc_common.c +++ b/src/gen6_mfc_common.c @@ -1036,7 +1036,7 @@ intel_mfc_avc_ref_idx_state(VADriverContextP ctx, if (slice_type == SLICE_TYPE_P || slice_type == SLICE_TYPE_B) { slice_obj_surface = NULL; ref_surface_id = slice_param->RefPicList0[0].picture_id; - if (ref_surface_id != 0 && ref_surface_id != VA_INVALID_SURFACE) { + if (ref_surface_id != VA_INVALID_SURFACE) { slice_obj_surface = SURFACE(ref_surface_id); } if (slice_obj_surface && slice_obj_surface->bo) { @@ -1067,7 +1067,7 @@ intel_mfc_avc_ref_idx_state(VADriverContextP ctx, if (slice_type == SLICE_TYPE_B) { slice_obj_surface = NULL; ref_surface_id = slice_param->RefPicList1[0].picture_id; - if (ref_surface_id != 0 && ref_surface_id != VA_INVALID_SURFACE) { + if (ref_surface_id != VA_INVALID_SURFACE) { slice_obj_surface = SURFACE(ref_surface_id); } if (slice_obj_surface && slice_obj_surface->bo) { diff --git a/src/gen6_vme.c b/src/gen6_vme.c index 1d47517..1345466 100644 --- a/src/gen6_vme.c +++ b/src/gen6_vme.c @@ -223,7 +223,7 @@ gen6_vme_surface_setup(VADriverContextP ctx, if (slice_type == SLICE_TYPE_P || slice_type == SLICE_TYPE_B) { slice_obj_surface = NULL; ref_surface_id = slice_param->RefPicList0[0].picture_id; - if (ref_surface_id != 0 && ref_surface_id != VA_INVALID_SURFACE) { + if (ref_surface_id != VA_INVALID_SURFACE) { slice_obj_surface = SURFACE(ref_surface_id); } if (slice_obj_surface && slice_obj_surface->bo) { @@ -239,7 +239,7 @@ gen6_vme_surface_setup(VADriverContextP ctx, /* reference 1 */ slice_obj_surface = NULL; ref_surface_id = slice_param->RefPicList1[0].picture_id; - if (ref_surface_id != 0 && ref_surface_id != VA_INVALID_SURFACE) { + if (ref_surface_id != VA_INVALID_SURFACE) { slice_obj_surface = SURFACE(ref_surface_id); } if (slice_obj_surface && slice_obj_surface->bo) { diff --git a/src/gen75_vme.c b/src/gen75_vme.c index 515d8c0..e9ddf0b 100644 --- a/src/gen75_vme.c +++ b/src/gen75_vme.c @@ -284,7 +284,7 @@ gen75_vme_surface_setup(VADriverContextP ctx, if (slice_type == SLICE_TYPE_P || slice_type == SLICE_TYPE_B) { slice_obj_surface = NULL; ref_surface_id = slice_param->RefPicList0[0].picture_id; - if (ref_surface_id != 0 && ref_surface_id != VA_INVALID_SURFACE) { + if (ref_surface_id != VA_INVALID_SURFACE) { slice_obj_surface = SURFACE(ref_surface_id); } if (slice_obj_surface && slice_obj_surface->bo) { @@ -300,7 +300,7 @@ gen75_vme_surface_setup(VADriverContextP ctx, /* reference 1 */ slice_obj_surface = NULL; ref_surface_id = slice_param->RefPicList1[0].picture_id; - if (ref_surface_id != 0 && ref_surface_id != VA_INVALID_SURFACE) { + if (ref_surface_id != VA_INVALID_SURFACE) { slice_obj_surface = SURFACE(ref_surface_id); } if (slice_obj_surface && slice_obj_surface->bo) { diff --git a/src/gen7_vme.c b/src/gen7_vme.c index e6de3af..2f167ab 100644 --- a/src/gen7_vme.c +++ b/src/gen7_vme.c @@ -269,7 +269,7 @@ gen7_vme_surface_setup(VADriverContextP ctx, if (slice_type == SLICE_TYPE_P || slice_type == SLICE_TYPE_B) { slice_obj_surface = NULL; ref_surface_id = slice_param->RefPicList0[0].picture_id; - if (ref_surface_id != 0 && ref_surface_id != VA_INVALID_SURFACE) { + if (ref_surface_id != VA_INVALID_SURFACE) { slice_obj_surface = SURFACE(ref_surface_id); } if (slice_obj_surface && slice_obj_surface->bo) { @@ -285,7 +285,7 @@ gen7_vme_surface_setup(VADriverContextP ctx, /* reference 1 */ slice_obj_surface = NULL; ref_surface_id = slice_param->RefPicList1[0].picture_id; - if (ref_surface_id != 0 && ref_surface_id != VA_INVALID_SURFACE) { + if (ref_surface_id != VA_INVALID_SURFACE) { slice_obj_surface = SURFACE(ref_surface_id); } if (slice_obj_surface && slice_obj_surface->bo) { |