mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-10-10 02:56:27 +02:00
hwcontext_vaapi: Don't abort on failing to allocate from a fixed-size pool
Cherry-picked from Libav d30719e62d
.
Signed-off-by: wm4 <nfxjfg@googlemail.com>
This commit is contained in:
parent
f07492e7fb
commit
2b8151c806
@ -397,6 +397,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