mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
pipewire: improve pw_init/pw_deinit
Keep a counter for the amount of times pw_init() was called and only clear everything when pw_deinit() was called an equal amount of times. Also ensure that pw_init() can be called again after pw_deinit(). Fixes #2238
This commit is contained in:
parent
34380ff02e
commit
b225fe1d54
2 changed files with 21 additions and 3 deletions
|
|
@ -49,9 +49,21 @@ PWTEST(library_version)
|
|||
return PWTEST_PASS;
|
||||
}
|
||||
|
||||
PWTEST(init_deinit)
|
||||
{
|
||||
pw_init(0, NULL);
|
||||
pw_deinit();
|
||||
pw_init(0, NULL);
|
||||
pw_init(0, NULL);
|
||||
pw_deinit();
|
||||
pw_deinit();
|
||||
return PWTEST_PASS;
|
||||
}
|
||||
|
||||
PWTEST_SUITE(properties)
|
||||
{
|
||||
pwtest_add(library_version, PWTEST_NOARG);
|
||||
pwtest_add(init_deinit, PWTEST_NOARG);
|
||||
|
||||
return PWTEST_PASS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue