Commit c0e570cd authored by Tristan Matthews's avatar Tristan Matthews

* #29632: opensl: fix buffer access

parent d092805a
......@@ -448,7 +448,7 @@ OpenSLLayer::startAudioPlayback()
buffer.reset();
result = (*playbackBufferQueue_)->Enqueue(playbackBufferQueue_, &buffer.getData(), buffer.size());
result = (*playbackBufferQueue_)->Enqueue(playbackBufferQueue_, buffer.getData()[0].data(), buffer.size());
if (SL_RESULT_SUCCESS != result) {
DEBUG("Error could not enqueue initial buffers\n");
......@@ -490,7 +490,7 @@ OpenSLLayer::startAudioCapture()
buffer.reset();
DEBUG("Enqueue record buffer\n");
result = (*recorderBufferQueue_)->Enqueue(recorderBufferQueue_, &buffer.getData(), buffer.size());
result = (*recorderBufferQueue_)->Enqueue(recorderBufferQueue_, buffer.getData()[0].data(), buffer.size());
// the most likely other result is SL_RESULT_BUFFER_INSUFFICIENT,
// which for this code example would indicate a programming error
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment