spa: ensure enum always has 2 values

We need at least a default value and the default value as a possible
value.

For enum type in the PropInfo we usually list just the basic type and
then use labels to list alternatives.
This commit is contained in:
Wim Taymans 2025-11-04 09:19:26 +01:00
parent ef7d4a3fc3
commit 41cdd82291
3 changed files with 4 additions and 4 deletions

View file

@ -1612,7 +1612,7 @@ PWTEST(pod_overflow)
spa_pod_builder_push_object(&b, &f[0], SPA_TYPE_OBJECT_PropInfo, SPA_PARAM_PropInfo);
spa_pod_builder_add(&b,
SPA_PROP_INFO_id, SPA_POD_Id(32567359),
SPA_PROP_INFO_type, SPA_POD_CHOICE_ENUM_Int(1, 0),
SPA_PROP_INFO_type, SPA_POD_Int(0),
SPA_PROP_INFO_description, SPA_POD_String("DV Timings"),
0);
@ -1669,7 +1669,7 @@ PWTEST(pod_overflow2)
spa_pod_builder_push_object(&b, &f[0], SPA_TYPE_OBJECT_PropInfo, SPA_PARAM_PropInfo);
spa_pod_builder_add(&b,
SPA_PROP_INFO_id, SPA_POD_Id(32567359),
SPA_PROP_INFO_type, SPA_POD_CHOICE_ENUM_Int(1, 0),
SPA_PROP_INFO_type, SPA_POD_Int(0),
SPA_PROP_INFO_description, SPA_POD_String("DV Timings"),
0);