diff options
Diffstat (limited to 'media/audio/linux')
-rw-r--r-- | media/audio/linux/alsa_input.cc | 3 | ||||
-rw-r--r-- | media/audio/linux/alsa_input.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/media/audio/linux/alsa_input.cc b/media/audio/linux/alsa_input.cc index 13aea5b4..afc37d6 100644 --- a/media/audio/linux/alsa_input.cc +++ b/media/audio/linux/alsa_input.cc @@ -7,7 +7,6 @@ #include "base/basictypes.h" #include "base/logging.h" #include "base/message_loop.h" -#include "base/scoped_ptr.h" #include "base/time.h" #include "media/audio/linux/alsa_util.h" #include "media/audio/linux/alsa_wrapper.h" @@ -193,6 +192,8 @@ void AlsaPcmInputStream::Stop() { } void AlsaPcmInputStream::Close() { + scoped_ptr<AlsaPcmInputStream> self_deleter(this); + // Check in case we were already closed or not initialized yet. if (!device_handle_ || !callback_) return; diff --git a/media/audio/linux/alsa_input.h b/media/audio/linux/alsa_input.h index 94af7df..4e99ba3 100644 --- a/media/audio/linux/alsa_input.h +++ b/media/audio/linux/alsa_input.h @@ -59,7 +59,7 @@ class AlsaPcmInputStream : public AudioInputStream { base::Time next_read_time_; // Scheduled time for the next read callback. snd_pcm_t* device_handle_; // Handle to the ALSA PCM recording device. ScopedRunnableMethodFactory<AlsaPcmInputStream> task_factory_; - scoped_ptr<uint8> audio_packet_; // Data buffer used for reading audio data. + scoped_array<uint8> audio_packet_; // Buffer used for reading audio data. DISALLOW_COPY_AND_ASSIGN(AlsaPcmInputStream); }; |