From: Peter Meerwald <p.meerwald@xxxxxxxxxxxxxxxxxx> pa_init_remap_func() only sets the appropriate remapping function, it does not initialize the pa_remap struct Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net> --- src/pulsecore/remap.c | 12 ++++++------ src/pulsecore/remap.h | 2 +- src/pulsecore/resampler.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pulsecore/remap.c b/src/pulsecore/remap.c index da72a62..653ee7e 100644 --- a/src/pulsecore/remap.c +++ b/src/pulsecore/remap.c @@ -179,15 +179,15 @@ static void init_remap_c(pa_remap_t *m) { } /* default C implementation */ -static pa_init_remap_func_t remap_func = init_remap_c; +static pa_init_remap_func_t init_remap_func = init_remap_c; -void pa_init_remap(pa_remap_t *m) { - pa_assert(remap_func); +void pa_init_remap_func(pa_remap_t *m) { + pa_assert(init_remap_func); m->do_remap = NULL; /* call the installed remap init function */ - remap_func(m); + init_remap_func(m); if (m->do_remap == NULL) { /* nothing was installed, fallback to C version */ @@ -196,9 +196,9 @@ void pa_init_remap(pa_remap_t *m) { } pa_init_remap_func_t pa_get_init_remap_func(void) { - return remap_func; + return init_remap_func; } void pa_set_init_remap_func(pa_init_remap_func_t func) { - remap_func = func; + init_remap_func = func; } diff --git a/src/pulsecore/remap.h b/src/pulsecore/remap.h index 32a67cd..6411a46 100644 --- a/src/pulsecore/remap.h +++ b/src/pulsecore/remap.h @@ -37,7 +37,7 @@ struct pa_remap { pa_do_remap_func_t do_remap; }; -void pa_init_remap (pa_remap_t *m); +void pa_init_remap_func(pa_remap_t *m); /* custom installation of init functions */ typedef void (*pa_init_remap_func_t) (pa_remap_t *m); diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c index 4a9c1f5..f628141 100644 --- a/src/pulsecore/resampler.c +++ b/src/pulsecore/resampler.c @@ -1151,7 +1151,7 @@ static void calc_map_table(pa_resampler *r) { pa_xfree(t); /* initialize the remapping function */ - pa_init_remap(m); + pa_init_remap_func(m); } /* check if buf's memblock is large enough to hold 'len' bytes; create a -- 1.9.1