Index: trunk/src/media/cast/audio_receiver/audio_decoder.cc |
=================================================================== |
--- trunk/src/media/cast/audio_receiver/audio_decoder.cc (revision 226266) |
+++ trunk/src/media/cast/audio_receiver/audio_decoder.cc (working copy) |
@@ -13,9 +13,9 @@ |
AudioDecoder::AudioDecoder(scoped_refptr<CastThread> cast_thread, |
const AudioReceiverConfig& audio_config) |
- : audio_decoder_(webrtc::AudioCodingModule::Create(0)), |
- have_received_packets_(false), |
- cast_thread_(cast_thread) { |
+ : cast_thread_(cast_thread), |
+ have_received_packets_(false) { |
+ audio_decoder_ = webrtc::AudioCodingModule::Create(0); |
audio_decoder_->InitializeReceiver(); |
webrtc::CodecInst receive_codec; |
@@ -49,6 +49,7 @@ |
} |
AudioDecoder::~AudioDecoder() { |
+ webrtc::AudioCodingModule::Destroy(audio_decoder_); |
} |
bool AudioDecoder::GetRawAudioFrame(int number_of_10ms_blocks, |
@@ -96,4 +97,4 @@ |
} |
} // namespace cast |
-} // namespace media |
+} // namespace media |