Skip to content
Snippets Groups Projects
Commit 2b8151c8 authored by Mark Thompson's avatar Mark Thompson Committed by wm4
Browse files

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


Cherry-picked from Libav d30719e6.

Signed-off-by: default avatarwm4 <nfxjfg@googlemail.com>
parent f07492e7
No related branches found
No related tags found
No related merge requests found
...@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment