Compare commits

...

2 commits

Author SHA1 Message Date
Hans de Goede
6660ab8907 Merge branch 'spa-v4l2-log-fix' into 'master'
spa: v4l2: Add missing v4l2_log_topic_init() call to device/udev impl_init()

See merge request pipewire/pipewire!2117
2025-10-22 08:53:54 +02:00
Hans de Goede
e48a1595a6 spa: v4l2: Add missing v4l2_log_topic_init() call to device/udev impl_init()
Wireplumber creates SPA objects of the "api.v4l2.enum.udev" type without
ever creating any "api.v4l2.source" objects.

This was causing the v4l2_log_topic variable to never get initialized,
causing spa_log_xxx() calls in v4l2-udev.c to not work.

Call v4l2_log_topic_init() from v4l2-udev's impl_init() to fix this.

v4l2-device's impl_init() is also missing a call to v4l2_log_topic_init(),
add this as well.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2024-09-10 17:42:26 +02:00
2 changed files with 3 additions and 0 deletions

View file

@ -231,6 +231,7 @@ impl_init(const struct spa_handle_factory *factory,
handle->clear = impl_clear, this = (struct impl *) handle;
this->log = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_Log);
v4l2_log_topic_init(this->log);
spa_hook_list_init(&this->hooks);

View file

@ -775,6 +775,8 @@ impl_init(const struct spa_handle_factory *factory,
#endif
this->log = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_Log);
v4l2_log_topic_init(this->log);
this->main_loop = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_Loop);
if (this->main_loop == NULL) {