From 4bd486b9b7d22f35de5a88786978dd1b924fe0ce Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Sun, 13 Mar 2022 00:17:48 +0900 Subject: [PATCH] nvenc: Fix deadlock because of too strict buffer pool size The pool size might need to be larger than encoding surface pool size. Also, because we always copy input frame into internal CUDA memory, there's no reason to restrict max size of buffer pool. Part-of: --- subprojects/gst-plugins-bad/sys/nvcodec/gstnvbaseenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvbaseenc.c b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvbaseenc.c index 4299f5a213..02c7037e60 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvbaseenc.c +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvbaseenc.c @@ -667,10 +667,10 @@ gst_nv_base_enc_propose_allocation (GstVideoEncoder * enc, GstQuery * query) config = gst_buffer_pool_get_config (pool); gst_buffer_pool_config_set_params (config, caps, GST_VIDEO_INFO_SIZE (&info), - nvenc->items->len, nvenc->items->len); + nvenc->items->len, 0); gst_query_add_allocation_pool (query, pool, GST_VIDEO_INFO_SIZE (&info), - nvenc->items->len, nvenc->items->len); + nvenc->items->len, 0); gst_buffer_pool_config_add_option (config, GST_BUFFER_POOL_OPTION_VIDEO_META); gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL);