Commit 2b8151c8 authored by Mark Thompson's avatar Mark Thompson Committed by wm4

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

Cherry-picked from Libav d30719e6.
Signed-off-by: 's avatarwm4 <nfxjfg@googlemail.com>
parent f07492e7
...@@ -397,6 +397,10 @@ static AVBufferRef *vaapi_pool_alloc(void *opaque, int size) ...@@ -397,6 +397,10 @@ static AVBufferRef *vaapi_pool_alloc(void *opaque, int size)
VAStatus vas; VAStatus vas;
AVBufferRef *ref; AVBufferRef *ref;
if (hwfc->initial_pool_size > 0 &&
avfc->nb_surfaces >= hwfc->initial_pool_size)
return NULL;
vas = vaCreateSurfaces(hwctx->display, ctx->rt_format, vas = vaCreateSurfaces(hwctx->display, ctx->rt_format,
hwfc->width, hwfc->height, hwfc->width, hwfc->height,
&surface_id, 1, &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