diff mbox series

[FFmpeg-devel,1/4] avutils: hwcontext_vaapi, print error if allocated surfaces > pool size

Message ID 20211118040549.3871537-1-guangxin.xu@intel.com
State New
Headers show
Series [FFmpeg-devel,1/4] avutils: hwcontext_vaapi, print error if allocated surfaces > pool size
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Xu, Guangxin Nov. 18, 2021, 4:05 a.m. UTC
---
 libavutil/hwcontext_vaapi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
index 83e542876d..14a2df38c6 100644
--- a/libavutil/hwcontext_vaapi.c
+++ b/libavutil/hwcontext_vaapi.c
@@ -475,8 +475,11 @@  static AVBufferRef *vaapi_pool_alloc(void *opaque, size_t size)
     AVBufferRef *ref;
 
     if (hwfc->initial_pool_size > 0 &&
-        avfc->nb_surfaces >= hwfc->initial_pool_size)
+        avfc->nb_surfaces >= hwfc->initial_pool_size) {
+        av_log(hwfc, AV_LOG_ERROR, "allocated surfaces count(%d) > pool_size(%d)\n",
+               avfc->nb_surfaces,  hwfc->initial_pool_size);
         return NULL;
+    }
 
     vas = vaCreateSurfaces(hwctx->display, ctx->rt_format,
                            hwfc->width, hwfc->height,