diff options
author | Yoann Lopes <yoann.lopes@digia.com> | 2014-05-21 12:47:03 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-30 14:47:20 +0200 |
commit | 5a0e49369da7ac04c9bd9eb089a4b001f6a13278 (patch) | |
tree | 5bf3cb743460ba54fb7aee24388db2d21638ed6c /src/plugins | |
parent | 69598e22f36b5e65cc7c979d1aee002ac564da5a (diff) |
OpenSL: don't try to enqueue new buffers when the buffer queue is full.
It could lead to corrupted sound since we were overwritting buffers
that weren't played yet.
Task-number: QTBUG-39015
Change-Id: I4c015c5383b813955998145d6316acc8c22f19a3
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/opensles/qopenslesaudiooutput.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/opensles/qopenslesaudiooutput.cpp b/src/plugins/opensles/qopenslesaudiooutput.cpp index df91e6ff1..49bea0b36 100644 --- a/src/plugins/opensles/qopenslesaudiooutput.cpp +++ b/src/plugins/opensles/qopenslesaudiooutput.cpp @@ -568,7 +568,7 @@ void QOpenSLESAudioOutput::destroyPlayer() qint64 QOpenSLESAudioOutput::writeData(const char *data, qint64 len) { - if (!len) + if (!len || !m_availableBuffers.load()) return 0; if (len > m_bufferSize) |