Commit d30719e6 authored by Mark Thompson's avatar Mark Thompson

hwcontext_vaapi: Don't abort on failing to allocate from a fixed-size pool

parent 4adbb44a
......@@ -388,6 +388,10 @@ static AVBufferRef *vaapi_pool_alloc(void *opaque, int size)
VAStatus vas;
AVBufferRef *ref;
if (hwfc->initial_pool_size > 0 &&
avfc->nb_surfaces >= hwfc->initial_pool_size)
return NULL;
vas = vaCreateSurfaces(hwctx->display, ctx->rt_format,
hwfc->width, hwfc->height,
&surface_id, 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment