mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
Fall back to creating a "normal" memory pool if unable to get a shared one.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1321 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
26bfce6281
commit
7bf2540778
1 changed files with 13 additions and 4 deletions
|
|
@ -49,11 +49,20 @@ pa_core* pa_core_new(pa_mainloop_api *m, int shared) {
|
|||
pa_core* c;
|
||||
pa_mempool *pool;
|
||||
|
||||
if (!(pool = pa_mempool_new(shared))) {
|
||||
pa_log("pa_mempool_new() failed.");
|
||||
return NULL;
|
||||
if (shared) {
|
||||
if (!(pool = pa_mempool_new(shared))) {
|
||||
pa_log_warn("failed to allocate shared memory pool. Falling back to a normal memory pool.");
|
||||
shared = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (!shared) {
|
||||
if (!(pool = pa_mempool_new(shared))) {
|
||||
pa_log("pa_mempool_new() failed.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
c = pa_xnew(pa_core, 1);
|
||||
|
||||
c->mainloop = m;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue