diff options
author | Younes Manton <[email protected]> | 2009-01-13 22:58:43 -0500 |
---|---|---|
committer | Younes Manton <[email protected]> | 2009-01-18 21:40:10 -0500 |
commit | 11f91936f21c1ab0b38f0f84bb2cbf82f9cadece (patch) | |
tree | ec93e2fcf98e33d295e18b2a3e139f21244c7b4f /src/xvmc | |
parent | c35dc4a741d4147a5da8bbe834a38a4c2ce627d1 (diff) |
g3dvl: Return BadAlloc if we can't create an XvMC surface.
Diffstat (limited to 'src/xvmc')
-rw-r--r-- | src/xvmc/surface.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/xvmc/surface.c b/src/xvmc/surface.c index 67c179e66d3..7c5f45bd346 100644 --- a/src/xvmc/surface.c +++ b/src/xvmc/surface.c @@ -73,14 +73,13 @@ Status XvMCCreateSurface(Display *display, XvMCContext *context, XvMCSurface *su assert(display == vlGetNativeDisplay(vlGetDisplay(vlContextGetScreen(vl_ctx)))); - vlCreateSurface - ( - vlContextGetScreen(vl_ctx), - context->width, - context->height, - vlGetPictureFormat(vl_ctx), - &vl_sfc - ); + if (vlCreateSurface(vlContextGetScreen(vl_ctx), + context->width, context->height, + vlGetPictureFormat(vl_ctx), + &vl_sfc)) + { + return BadAlloc; + } vlBindToContext(vl_sfc, vl_ctx); |