g3dvl: Return BadAlloc if we can't create an XvMC surface.
This commit is contained in:
@@ -51,6 +51,12 @@ int vlCreateSurface
|
||||
|
||||
sfc->texture = vlGetPipeScreen(screen)->texture_create(vlGetPipeScreen(screen), &template);
|
||||
|
||||
if (!sfc->texture)
|
||||
{
|
||||
FREE(sfc);
|
||||
return 1;
|
||||
}
|
||||
|
||||
*surface = sfc;
|
||||
|
||||
return 0;
|
||||
|
||||
+7
-8
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user