mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 853077 - Don't queue empty buffers in the opensles cubeb backend, r=kinetik
This commit is contained in:
parent
212e180404
commit
173b19e7f1
@ -5,4 +5,4 @@ Makefile.in build files for the Mozilla build system.
|
||||
|
||||
The cubeb git repository is: git://github.com/kinetiknz/cubeb.git
|
||||
|
||||
The git commit ID used was c9c97571980ca77c990a763802c11682a332cbd6.
|
||||
The git commit ID used was bfaee9a6c7a15dfe8ae2ffda8dcd156d5a562010.
|
||||
|
@ -52,8 +52,9 @@ struct cubeb_stream {
|
||||
};
|
||||
|
||||
static void
|
||||
bufferqueue_callback(SLBufferQueueItf caller, struct cubeb_stream *stm)
|
||||
bufferqueue_callback(SLBufferQueueItf caller, void * user_ptr)
|
||||
{
|
||||
cubeb_stream * stm = user_ptr;
|
||||
SLBufferQueueState state;
|
||||
(*stm->bufq)->GetState(stm->bufq, &state);
|
||||
|
||||
@ -78,8 +79,13 @@ bufferqueue_callback(SLBufferQueueItf caller, struct cubeb_stream *stm)
|
||||
return;
|
||||
}
|
||||
|
||||
(*stm->bufq)->Enqueue(stm->bufq, buf, written * stm->framesize);
|
||||
stm->queuebuf_idx = (stm->queuebuf_idx + 1) % NBUFS;
|
||||
if (written) {
|
||||
(*stm->bufq)->Enqueue(stm->bufq, buf, written * stm->framesize);
|
||||
stm->queuebuf_idx = (stm->queuebuf_idx + 1) % NBUFS;
|
||||
} else if (!i) {
|
||||
stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_DRAINED);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((written * stm->framesize) < stm->queuebuf_len) {
|
||||
stm->draining = 1;
|
||||
|
@ -27,7 +27,7 @@ if [ -n "$rev" ]; then
|
||||
version=$version-dirty
|
||||
echo "WARNING: updating from a dirty git repository."
|
||||
fi
|
||||
sed -i.bak -e "/The git commit ID used was/ s/[0-9a-f]\+\(-dirty\)\?\./$version./" README_MOZILLA
|
||||
sed -i.bak -e "/The git commit ID used was/ s/[0-9a-f]\{40\}\(-dirty\)\{0,1\}\./$version./" README_MOZILLA
|
||||
rm README_MOZILLA.bak
|
||||
else
|
||||
echo "Remember to update README_MOZILLA with the version details."
|
||||
|
Loading…
Reference in New Issue
Block a user