OSDN Git Service

Avoid assertion fault when trying to draw a big picture
authorXiang, Haihao <haihao.xiang@intel.com>
Thu, 1 Jun 2017 15:46:18 +0000 (23:46 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Tue, 6 Jun 2017 00:33:22 +0000 (08:33 +0800)
The display server doesn't support the big picture, so the returned
buffer is NULL. The fix returns a NULL buffer instead of assertion fault
in libva-x11, the backend driver should handle this case in a right way
as well.

This fixes https://github.com/01org/libva/issues/51

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
va/x11/dri2_util.c

index 4fddf37..32d616c 100644 (file)
@@ -130,7 +130,6 @@ dri2GetRenderingBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable)
     buffers = VA_DRI2GetBuffers(ctx->native_dpy, dri_drawable->x_drawable,
                             &dri2_drawable->width, &dri2_drawable->height, 
                              attachments, i, &count);
-    assert(buffers);
     if (buffers == NULL)
         return NULL;