From e4072fb1f2cccb468fc84c67c5c51e649affec48 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Thu, 1 Jun 2017 23:46:18 +0800 Subject: [PATCH] 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 --- va/x11/dri2_util.c | 1 - 1 file changed, 1 deletion(-) 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; -- 2.11.0