aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cubeb_audiounit.cpp
diff options
context:
space:
mode:
authorAlex Chronopoulos <[email protected]>2018-10-04 14:27:23 +0300
committerPaul Adenot <[email protected]>2018-10-04 13:27:23 +0200
commitc6692b1c4789f017a4c22783e7e351d8508e0bb6 (patch)
treef2a372ee07b4416c88bf8af200e01862688ad0e7 /src/cubeb_audiounit.cpp
parentb832dae6e48d3a95d1e6d977d0b7c53a873fd246 (diff)
downloadcubeb-c6692b1c4789f017a4c22783e7e351d8508e0bb6.tar.gz
cubeb-c6692b1c4789f017a4c22783e7e351d8508e0bb6.zip
audiounit: avoid access to input buffer on playback case (#460)
Diffstat (limited to 'src/cubeb_audiounit.cpp')
-rw-r--r--src/cubeb_audiounit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cubeb_audiounit.cpp b/src/cubeb_audiounit.cpp
index 6f205a1..cf87351 100644
--- a/src/cubeb_audiounit.cpp
+++ b/src/cubeb_audiounit.cpp
@@ -587,7 +587,7 @@ audiounit_output_callback(void * user_ptr,
(unsigned int) outBufferList->mBuffers[0].mDataByteSize,
(unsigned int) outBufferList->mBuffers[0].mNumberChannels,
(unsigned int) output_frames,
- stm->input_linear_buffer->length() / stm->input_desc.mChannelsPerFrame);
+ has_input(stm) ? stm->input_linear_buffer->length() / stm->input_desc.mChannelsPerFrame : 0);
long input_frames = 0;
void * output_buffer = NULL, * input_buffer = NULL;