mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
if the memblockq is empty, return -1 in all cases
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1166 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
9310a2e3b8
commit
f15b4c7c70
1 changed files with 6 additions and 0 deletions
|
|
@ -368,6 +368,12 @@ int pa_memblockq_peek(pa_memblockq* bq, pa_memchunk *chunk) {
|
|||
|
||||
chunk->length = length;
|
||||
} else {
|
||||
|
||||
/* If the memblockq is empty, return -1, otherwise return
|
||||
* the time to sleep */
|
||||
if (!bq->blocks)
|
||||
return -1;
|
||||
|
||||
chunk->memblock = NULL;
|
||||
chunk->length = length;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue