Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(604)

Unified Diff: media/audio/pulse/pulse_input.cc

Issue 520613003: Fix memory leaks related to PulseAudioInputStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comment. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/pulse/pulse_input.cc
diff --git a/media/audio/pulse/pulse_input.cc b/media/audio/pulse/pulse_input.cc
index 6c9855e504c568bf47771ae04e6470c5f06ac061..0a9e909a59293854a13cfa1f42071d6e7be3c879 100644
--- a/media/audio/pulse/pulse_input.cc
+++ b/media/audio/pulse/pulse_input.cc
@@ -119,7 +119,10 @@ void PulseAudioInputStream::Close() {
if (handle_) {
// Disable all the callbacks before disconnecting.
pa_stream_set_state_callback(handle_, NULL, NULL);
- pa_stream_flush(handle_, NULL, NULL);
+ pa_operation* operation = pa_stream_flush(handle_,
DaleCurtis 2014/08/29 18:12:04 Wrapping is incorrect, move handle_ to the next li
+ &pulse::StreamSuccessCallback,
+ pa_mainloop_);
+ WaitForOperationCompletion(pa_mainloop_, operation);
if (pa_stream_get_state(handle_) != PA_STREAM_UNCONNECTED)
pa_stream_disconnect(handle_);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698