mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-09-06 16:56:00 +00:00
doc: tutorial3: do not spa_zero()
the hook objects
`spa_hook_list_append()` zeroes the hooks when they are inserted into the list of hooks.
This commit is contained in:
parent
bb0cda3d94
commit
f61bb3aef5
|
@ -22,7 +22,6 @@ static int roundtrip(struct pw_core *core, struct pw_main_loop *loop)
|
|||
.done = core_event_done,
|
||||
};
|
||||
|
||||
spa_zero(core_listener);
|
||||
pw_core_add_listener(core, &core_listener,
|
||||
&core_events, NULL);
|
||||
|
||||
|
@ -70,7 +69,6 @@ int main(int argc, char *argv[])
|
|||
registry = pw_core_get_registry(core, PW_VERSION_REGISTRY,
|
||||
0 /* user_data size */);
|
||||
|
||||
spa_zero(registry_listener);
|
||||
pw_registry_add_listener(registry, ®istry_listener,
|
||||
®istry_events, NULL);
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Let's take a look at what this method does.
|
|||
|
||||
\code{.c}
|
||||
struct spa_hook core_listener;
|
||||
spa_zero(core_listener);
|
||||
|
||||
pw_core_add_listener(core, &core_listener,
|
||||
&core_events, NULL);
|
||||
\endcode
|
||||
|
|
Loading…
Reference in a new issue