| Index: media/audio/pulse/pulse_input.cc
|
| diff --git a/media/audio/pulse/pulse_input.cc b/media/audio/pulse/pulse_input.cc
|
| index 4a56d3a6b1407321484b8c00c85b2cbe81f4cf6a..14ef242759a68d48db6da943ebb899b1089c3cf6 100644
|
| --- a/media/audio/pulse/pulse_input.cc
|
| +++ b/media/audio/pulse/pulse_input.cc
|
| @@ -74,10 +74,6 @@ void PulseAudioInputStream::Start(AudioInputCallback* callback) {
|
| if (stream_started_)
|
| return;
|
|
|
| - // Clean up the old buffer.
|
| - pa_stream_drop(handle_);
|
| - fifo_.Clear();
|
| -
|
| // Start the streaming.
|
| callback_ = callback;
|
| pa_stream_set_read_callback(handle_, &ReadCallback, this);
|
| @@ -99,6 +95,10 @@ void PulseAudioInputStream::Stop() {
|
| // Set the flag to false to stop filling new data to soundcard.
|
| stream_started_ = false;
|
|
|
| + // Clean up the old buffer.
|
| + pa_stream_drop(handle_);
|
| + fifo_.Clear();
|
| +
|
| pa_operation* operation = pa_stream_flush(handle_,
|
| &pulse::StreamSuccessCallback,
|
| pa_mainloop_);
|
|
|