vl_compositor_set_csc_matrix may return false Signed-off-by: Nayan Deshmukh <nayan26deshm...@gmail.com> --- src/gallium/state_trackers/xvmc/attributes.c | 3 ++- src/gallium/state_trackers/xvmc/context.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/gallium/state_trackers/xvmc/attributes.c b/src/gallium/state_trackers/xvmc/attributes.c index 3757056..1133fc2 100644 --- a/src/gallium/state_trackers/xvmc/attributes.c +++ b/src/gallium/state_trackers/xvmc/attributes.c @@ -110,7 +110,8 @@ Status XvMCSetAttribute(Display *dpy, XvMCContext *context, Atom attribute, int context_priv->color_standard, &context_priv->procamp, true, &csc ); - vl_compositor_set_csc_matrix(&context_priv->cstate, (const vl_csc_matrix *)&csc, 1.0f, 0.0f); + if (!vl_compositor_set_csc_matrix(&context_priv->cstate, (const vl_csc_matrix *)&csc, 1.0f, 0.0f)) + return BadAlloc; XVMC_MSG(XVMC_TRACE, "[XvMC] Set attribute %s to value %d.\n", attr, value); diff --git a/src/gallium/state_trackers/xvmc/context.c b/src/gallium/state_trackers/xvmc/context.c index fb9f435..fac3fde 100644 --- a/src/gallium/state_trackers/xvmc/context.c +++ b/src/gallium/state_trackers/xvmc/context.c @@ -278,7 +278,8 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id, context_priv->color_standard, &context_priv->procamp, true, &csc ); - vl_compositor_set_csc_matrix(&context_priv->cstate, (const vl_csc_matrix *)&csc, 1.0f, 0.0f); + if (!vl_compositor_set_csc_matrix(&context_priv->cstate, (const vl_csc_matrix *)&csc, 1.0f, 0.0f)) + goto err_csc_matrix; context_priv->vscreen = vscreen; context_priv->pipe = pipe; @@ -299,6 +300,7 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id, return Success; +err_csc_matrix: no_compositor_state: vl_compositor_cleanup(&context_priv->compositor); no_compositor: -- 2.9.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev