[Libva] [PATCH] Fix for check i965_check_alloc_surface_bo ret

Zhao, Halley halley.zhao at intel.com
Fri Mar 21 00:56:39 PDT 2014


From: "Zhao, Halley" <halley.zhao at intel.com>

---
 src/i965_drv_video.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 750d92e..67f93ef 100755
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -3204,11 +3204,10 @@ VAStatus i965_DeriveImage(VADriverContextP ctx,
         i965_guess_surface_format(ctx, surface, &fourcc, &is_tiled);
         int sampling = get_sampling_from_fourcc(fourcc);
         va_status = i965_check_alloc_surface_bo(ctx, obj_surface, is_tiled, fourcc, sampling);
+        if (va_status != VA_STATUS_SUCCESS)
+            return va_status;
     }
 
-    if (va_status != VA_STATUS_SUCCESS)
-        return va_status;
-
     ASSERT_RET(obj_surface->fourcc, VA_STATUS_ERROR_INVALID_SURFACE);
 
     w_pitch = obj_surface->width;
-- 
1.8.3.2



More information about the Libva mailing list