buffers: tweak some limits

Allow max 64 metadatas on a buffer
This commit is contained in:
Wim Taymans 2026-06-16 18:24:14 +02:00
parent 1a638fba60
commit 9a19091ac7
3 changed files with 3 additions and 3 deletions

View file

@ -30,7 +30,6 @@ PW_LOG_TOPIC_EXTERN(mod_topic);
#define AREA_SLOT (sizeof(struct spa_io_async_buffers))
#define AREA_SIZE (4096u / AREA_SLOT)
#define MAX_AREAS 32
#define CHECK_FREE_PORT(impl,d,p) (p <= pw_map_get_size(&impl->ports[d]) && !CHECK_PORT(impl,d,p))
#define CHECK_PORT(impl,d,p) (pw_map_lookup(&impl->ports[d], p) != NULL)

View file

@ -17,7 +17,7 @@
#define MAX_PARAMS 4096
#define MAX_PARAM_INFO 128
#define MAX_BUFFERS 64
#define MAX_METAS 16u
#define MAX_METAS 64u
#define MAX_DATAS 256u
PW_LOG_TOPIC_EXTERN(mod_topic);

View file

@ -18,6 +18,7 @@ PW_LOG_TOPIC_EXTERN(log_buffers);
#define PW_LOG_TOPIC_DEFAULT log_buffers
#define MAX_ALIGN 32u
#define MAX_METAS 64u
#define MAX_BLOCKS 256u
struct port {
@ -252,7 +253,7 @@ int pw_buffers_negotiate(struct pw_context *context, uint32_t flags,
if ((res = param_filter(result, &input, &output, SPA_PARAM_Meta, &b)) > 0)
n_params += res;
if (n_params > 4096)
if (n_params > MAX_METAS)
return -EINVAL;
metas = alloca(sizeof(struct spa_meta) * n_params * 2);