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 /src/gen7_vme.c | |
parent | 34de629665bed1be2413ff503ed12c6e189cb0d5 (diff) | |
download | libva-intel-driver-c68c6a0c57555acc1e3aa3f4320d1254f45bdc21.tar.gz |
Check the reference surface id against VA_INVALID_SURFACE
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit 0c2def319f52bdb222e5480d81feea486cbf3e11)
Diffstat (limited to 'src/gen7_vme.c')
-rw-r--r-- | src/gen7_vme.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gen7_vme.c b/src/gen7_vme.c index e6de3af1..2f167ab1 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) { |