mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-16 06:59:55 -05:00
tests: fix possible segfault in cpu-remap-test
pa_init_remap_func() takes care to initialise pa_remap_t.do_remap to NULL before calling init_remap_func (the CPU-specific remap init function) and invokes init_remap_c if init_remap_func did not set pa_remap_t.do_remap to non-NULL. remap_init_test_channels() calls init_remap_func() directly so it must make sure pa_remap_t.do_remap is set to NULL. Otherwise we'll end up with a random value in pa_remap_t.do_remap if there is no CPU-optimised remap function for the current operation.
This commit is contained in:
parent
993d3fd89e
commit
ac4a50268f
1 changed files with 1 additions and 1 deletions
|
|
@ -212,7 +212,7 @@ static void remap_init_test_channels(
|
|||
unsigned out_channels,
|
||||
bool rearrange) {
|
||||
|
||||
pa_remap_t remap_orig, remap_func;
|
||||
pa_remap_t remap_orig = {0}, remap_func = {0};
|
||||
|
||||
setup_remap_channels(&remap_orig, f, in_channels, out_channels, rearrange);
|
||||
orig_init_func(&remap_orig);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue