summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/buffering.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/buffering.c b/apps/buffering.c
index 0fd0c4c520..dd08b6ce78 100644
--- a/apps/buffering.c
+++ b/apps/buffering.c
@@ -212,9 +212,12 @@ buf_ridx == buf_widx means the buffer is empty.
212/* Add a new handle to the linked list and return it. It will have become the 212/* Add a new handle to the linked list and return it. It will have become the
213 new current handle. 213 new current handle.
214 data_size must contain the size of what will be in the handle. 214 data_size must contain the size of what will be in the handle.
215 On return, it's the size available for the handle.
216 can_wrap tells us whether this type of data may wrap on buffer 215 can_wrap tells us whether this type of data may wrap on buffer
217 alloc_all tells us if we must immediately be able to allocate data_size 216 alloc_all tells us if we must immediately be able to allocate data_size
217 returns a valid memory handle if all conditions for allocation are met.
218 NULL if there memory_handle itself cannot be allocated or if the
219 data_size cannot be allocated and alloc_all is set. This function
220 has no side effects if NULL is returned.
218 */ 221 */
219static struct memory_handle *add_handle(size_t data_size, const bool can_wrap, 222static struct memory_handle *add_handle(size_t data_size, const bool can_wrap,
220 const bool alloc_all) 223 const bool alloc_all)
@@ -578,6 +581,10 @@ static ssize_t buffer_handle(int handle_id)
578 h->filerem -= rc; 581 h->filerem -= rc;
579 582
580 /* Stop buffering if new queue events have arrived */ 583 /* Stop buffering if new queue events have arrived */
584 /* FIXME: This may sleep, if it does it will untrigger the
585 * cpu boost for this thread. If the codec's low data
586 * situation was very short lived that could leave us filling
587 * w/o boost */
581 if (yield_codec()) 588 if (yield_codec())
582 break; 589 break;
583 } 590 }