1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-09-16 08:36:51 +02:00

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

This commit is contained in:
Mark Thompson
2016-11-25 12:36:05 +00:00
parent 4adbb44ad1
commit d30719e62d

View File

@@ -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,