summaryrefslogtreecommitdiff
path: root/src/pulsecore/mcalign.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-05-15 23:34:41 +0000
committerLennart Poettering <lennart@poettering.net>2008-05-15 23:34:41 +0000
commit045c1d602dcba57868845ba3270510593c39480f (patch)
treeb3d61f180e6fa40f97a80aa3e46d7c910ed7c2a6 /src/pulsecore/mcalign.c
parent91f092eadcc5e9075e04ae42df11de28ef5047a8 (diff)
merge glitch-free branch back into trunk
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2445 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/mcalign.c')
-rw-r--r--src/pulsecore/mcalign.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/pulsecore/mcalign.c b/src/pulsecore/mcalign.c
index 8ca7c962d..e12f84f8a 100644
--- a/src/pulsecore/mcalign.c
+++ b/src/pulsecore/mcalign.c
@@ -197,7 +197,6 @@ int pa_mcalign_pop(pa_mcalign *m, pa_memchunk *c) {
/* There's simply nothing */
return -1;
-
}
size_t pa_mcalign_csize(pa_mcalign *m, size_t l) {
@@ -211,3 +210,11 @@ size_t pa_mcalign_csize(pa_mcalign *m, size_t l) {
return (l/m->base)*m->base;
}
+
+void pa_mcalign_flush(pa_mcalign *m) {
+ pa_memchunk chunk;
+ pa_assert(m);
+
+ while (pa_mcalign_pop(m, &chunk) >= 0)
+ pa_memblock_unref(chunk.memblock);
+}