implement recording in native API

fix a memory leak in memblock.c


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@55 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2004-07-10 16:50:22 +00:00
parent cffc7768bd
commit 70bb8165ec
11 changed files with 349 additions and 107 deletions

View file

@ -69,12 +69,13 @@ void pa_memblock_unref_fixed(struct pa_memblock *b) {
if (b->ref == 1) {
pa_memblock_unref(b);
return;
} else {
d = malloc(b->length);
assert(d);
memcpy(d, b->data, b->length);
b->data = d;
b->type = PA_MEMBLOCK_DYNAMIC;
b->ref--;
}
d = malloc(b->length);
assert(d);
memcpy(d, b->data, b->length);
b->data = d;
b->type = PA_MEMBLOCK_DYNAMIC;
}