diff options
author | Wim Taymans <wtaymans@redhat.com> | 2020-04-22 17:52:54 +0200 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2020-04-22 17:52:54 +0200 |
commit | 539be881ba2f392c5843297e091f06ae84c46832 (patch) | |
tree | a1b31d8325a51b1d5c0bc39a36461821468a8b2d | |
parent | 2c76ec51937e38866290a710b1a88d16f2a37385 (diff) |
plugin: increment version and avoid inspecting old versions
There are incompatible version 0 plugins around (the compat ones)
that crash spa-inspect. Increment the version number to avoid this.
-rw-r--r-- | spa/include/spa/support/plugin.h | 2 | ||||
-rw-r--r-- | spa/tools/spa-inspect.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/spa/include/spa/support/plugin.h b/spa/include/spa/support/plugin.h index 9c9dca26..ea4fc225 100644 --- a/spa/include/spa/support/plugin.h +++ b/spa/include/spa/support/plugin.h @@ -99,7 +99,7 @@ static inline void *spa_support_find(const struct spa_support *support, struct spa_handle_factory { /** The version of this structure */ -#define SPA_VERSION_HANDLE_FACTORY 0 +#define SPA_VERSION_HANDLE_FACTORY 1 uint32_t version; /** * The name of the factory contains a logical name that describes diff --git a/spa/tools/spa-inspect.c b/spa/tools/spa-inspect.c index cf31728e..9ad43990 100644 --- a/spa/tools/spa-inspect.c +++ b/spa/tools/spa-inspect.c @@ -203,7 +203,13 @@ static void inspect_factory(struct data *data, const struct spa_handle_factory * const struct spa_interface_info *info; uint32_t index; + printf("factory version:\t\t%d\n", factory->version); printf("factory name:\t\t'%s'\n", factory->name); + if (factory->version < SPA_VERSION_HANDLE_FACTORY) { + printf("\tno further info for version < %d\n", SPA_VERSION_HANDLE_FACTORY); + return; + } + printf("factory info:\n"); if (factory->info) spa_debug_dict(2, factory->info); |