mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
modify memory block reference counting to use the new reference counting API
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1342 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
9948cb09a3
commit
327e0cd8e1
3 changed files with 18 additions and 15 deletions
|
|
@ -38,9 +38,11 @@ void pa_memchunk_make_writable(pa_memchunk *c, size_t min) {
|
|||
|
||||
assert(c);
|
||||
assert(c->memblock);
|
||||
assert(c->memblock->ref >= 1);
|
||||
assert(PA_REFCNT_VALUE(c->memblock) > 0);
|
||||
|
||||
if (c->memblock->ref == 1 && !c->memblock->read_only && c->memblock->length >= c->index+min)
|
||||
if (PA_REFCNT_VALUE(c->memblock) == 1 &&
|
||||
!c->memblock->read_only &&
|
||||
c->memblock->length >= c->index+min)
|
||||
return;
|
||||
|
||||
l = c->length;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue