From: Lennart Poettering Date: Sat, 27 Oct 2007 12:58:54 +0000 (+0000) Subject: add missing pa_smoother destructor X-Git-Tag: submit/2.0-panda/20130828.192557~2837^2~1^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4d9a2bf858e1603649352fce0551cbdcbfaad0c;p=profile%2Fivi%2Fpulseaudio-panda.git add missing pa_smoother destructor git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1956 fefdeb5f-60dc-0310-8127-8f9354f1896f --- diff --git a/src/pulsecore/time-smoother.c b/src/pulsecore/time-smoother.c index 0b3594a..f8d2f91 100644 --- a/src/pulsecore/time-smoother.c +++ b/src/pulsecore/time-smoother.c @@ -108,6 +108,12 @@ pa_smoother* pa_smoother_new(pa_usec_t adjust_time, pa_usec_t history_time, pa_b return s; } +void pa_smoother_free(pa_smoother* s) { + pa_assert(s); + + pa_xfree(s); +} + static void drop_old(pa_smoother *s, pa_usec_t x) { unsigned j; diff --git a/src/pulsecore/time-smoother.h b/src/pulsecore/time-smoother.h index 038b7ae..8164718 100644 --- a/src/pulsecore/time-smoother.h +++ b/src/pulsecore/time-smoother.h @@ -30,6 +30,7 @@ typedef struct pa_smoother pa_smoother; pa_smoother* pa_smoother_new(pa_usec_t adjust_x, pa_usec_t history_x, pa_bool_t monotonic); +void pa_smoother_free(pa_smoother* s); void pa_smoother_put(pa_smoother *s, pa_usec_t x, pa_usec_t y); pa_usec_t pa_smoother_get(pa_smoother *s, pa_usec_t x); diff --git a/src/tests/smoother-test.c b/src/tests/smoother-test.c index ed4327e..96acdd4 100644 --- a/src/tests/smoother-test.c +++ b/src/tests/smoother-test.c @@ -69,4 +69,7 @@ int main(int argc, char*argv[]) { printf("%llu\t%llu\n", x/PA_USEC_PER_MSEC, pa_smoother_get(s, x)/PA_USEC_PER_MSEC); } + pa_smoother_free(s); + + return 0; }