summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/PulseAudioStream.cpp
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2015-08-15 12:51:11 +0200
committerTillmann Karras <tilkax@gmail.com>2015-08-15 12:51:11 +0200
commit0b73a9ed2544b84df04325008842e36adf8e110e (patch)
tree51fc589bec037874b894393e10e3bbd95a2e0340 /Source/Core/AudioCommon/PulseAudioStream.cpp
parentd8d62336b5c644fd3de55543ded8504c3f237d8f (diff)
PulseAudio: fix small memleak
Diffstat (limited to 'Source/Core/AudioCommon/PulseAudioStream.cpp')
-rw-r--r--Source/Core/AudioCommon/PulseAudioStream.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/AudioCommon/PulseAudioStream.cpp b/Source/Core/AudioCommon/PulseAudioStream.cpp
index 199d426474..b897f8beae 100644
--- a/Source/Core/AudioCommon/PulseAudioStream.cpp
+++ b/Source/Core/AudioCommon/PulseAudioStream.cpp
@@ -163,7 +163,8 @@ void PulseAudio::StateCallback(pa_context* c)
void PulseAudio::UnderflowCallback(pa_stream* s)
{
m_pa_ba.tlength += BUFFER_SAMPLES * m_channels * m_bytespersample;
- pa_stream_set_buffer_attr(s, &m_pa_ba, nullptr, nullptr);
+ pa_operation* op = pa_stream_set_buffer_attr(s, &m_pa_ba, nullptr, nullptr);
+ pa_operation_unref(op);
WARN_LOG(AUDIO, "pulseaudio underflow, new latency: %d bytes", m_pa_ba.tlength);
}