diff options
author | Alex Chronopoulos <[email protected]> | 2018-10-04 14:27:23 +0300 |
---|---|---|
committer | Paul Adenot <[email protected]> | 2018-10-04 13:27:23 +0200 |
commit | c6692b1c4789f017a4c22783e7e351d8508e0bb6 (patch) | |
tree | f2a372ee07b4416c88bf8af200e01862688ad0e7 /src/cubeb_audiounit.cpp | |
parent | b832dae6e48d3a95d1e6d977d0b7c53a873fd246 (diff) | |
download | cubeb-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.cpp | 2 |
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; |