mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-31 20:02:42 +00:00
hwcontext_vaapi: Don't abort on failing to allocate from a fixed-size pool
This commit is contained in:
parent
4adbb44ad1
commit
d30719e62d
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user