clean up pod_builder

Remove the frame argument from the builder, we can use the builder
allocated frames.
Add deref function to builder to make it more flexible later.
Add some more recursion depth checks in the parser.
Improve props filter, also filter other types.
This commit is contained in:
Wim Taymans 2017-11-08 15:48:31 +01:00
parent 30a4651c51
commit cc47fb7e3a
31 changed files with 246 additions and 218 deletions

View file

@ -64,11 +64,11 @@
*/
#endif
#define SPA_POD_MAX_LEVEL 16
#define SPA_POD_MAX_DEPTH 16
struct spa_pod_maker {
struct spa_pod_builder b;
struct spa_pod_frame frame[SPA_POD_MAX_LEVEL];
struct spa_pod_frame frame[SPA_POD_MAX_DEPTH];
int depth;
};
@ -392,7 +392,7 @@ static inline int
spa_pod_match(struct spa_pod *pod,
const char *templ, ...)
{
struct spa_pod_iter it[SPA_POD_MAX_LEVEL];
struct spa_pod_iter it[SPA_POD_MAX_DEPTH];
int depth = 0, collected = 0;
va_list args;
const char *start;