OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4adbb44
)
hwcontext_vaapi: Don't abort on failing to allocate from a fixed-size pool
author
Mark Thompson
<sw@jkqxz.net>
Fri, 25 Nov 2016 12:36:05 +0000
(12:36 +0000)
committer
Mark Thompson
<sw@jkqxz.net>
Sat, 26 Nov 2016 18:03:05 +0000
(18:03 +0000)
libavutil/hwcontext_vaapi.c
patch
|
blob
|
history
diff --git
a/libavutil/hwcontext_vaapi.c
b/libavutil/hwcontext_vaapi.c
index
1988729
..
b2e212c
100644
(file)
--- a/
libavutil/hwcontext_vaapi.c
+++ b/
libavutil/hwcontext_vaapi.c
@@
-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,