Skip to content
Snippets Groups Projects
Commit 1b44bf2e authored by Guillaume Roguez's avatar Guillaume Roguez
Browse files

audio: fix crash in readFromMic()

This crash is due to wrong stream usage (not initialized) in readFromMic.
playback stream was used than record.
This is a regression introduced by commit ac4ce3f4

Refs #73510

Change-Id: I2a16eefefdefaee89f24bf8ba6eac8c9634019f5
parent 2221a70e
No related branches found
No related tags found
No related merge requests found
......@@ -537,8 +537,8 @@ void PulseLayer::readFromMic()
if (pa_stream_peek(record_->stream() , (const void**) &data , &bytes) < 0 or !data)
return;
size_t sample_size = playback_->frameSize();
const AudioFormat format = playback_->format();
size_t sample_size = record_->frameSize();
const AudioFormat format = record_->format();
assert(format.nb_channels);
assert(sample_size);
const size_t samples = bytes / sample_size;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment