From: Xiang, Haihao Date: Thu, 1 Jun 2017 15:46:18 +0000 (+0800) Subject: Avoid assertion fault when trying to draw a big picture X-Git-Tag: android-x86-7.1-r1~14 X-Git-Url: http://git.osdn.net/view?p=android-x86%2Fhardware-intel-common-libva.git;a=commitdiff_plain;h=e4072fb1f2cccb468fc84c67c5c51e649affec48 Avoid assertion fault when trying to draw a big picture 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 --- diff --git a/va/x11/dri2_util.c b/va/x11/dri2_util.c index 4fddf37..32d616c 100644 --- a/va/x11/dri2_util.c +++ b/va/x11/dri2_util.c @@ -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;