OpenSl: fixes crashes externally reported in issue 2361 and 2362.
BUG=2361,2362 R=fischman@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2196008 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4726 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
036b7436df
commit
6138c5cfa4
@ -367,7 +367,7 @@ void OpenSlesInput::DestroyAudioRecorder() {
|
||||
}
|
||||
sles_recorder_itf_ = NULL;
|
||||
|
||||
if (!sles_recorder_) {
|
||||
if (sles_recorder_) {
|
||||
(*sles_recorder_)->Destroy(sles_recorder_);
|
||||
sles_recorder_ = NULL;
|
||||
}
|
||||
|
@ -109,6 +109,7 @@ int32_t OpenSlesOutput::Init() {
|
||||
int32_t OpenSlesOutput::Terminate() {
|
||||
// It is assumed that the caller has stopped recording before terminating.
|
||||
assert(!playing_);
|
||||
(*sles_output_mixer_)->Destroy(sles_output_mixer_);
|
||||
(*sles_engine_)->Destroy(sles_engine_);
|
||||
initialized_ = false;
|
||||
speaker_initialized_ = false;
|
||||
@ -436,11 +437,6 @@ void OpenSlesOutput::DestroyAudioPlayer() {
|
||||
(*sles_player_)->Destroy(sles_player_);
|
||||
sles_player_ = NULL;
|
||||
}
|
||||
|
||||
if (sles_output_mixer_) {
|
||||
(*sles_output_mixer_)->Destroy(sles_output_mixer_);
|
||||
sles_output_mixer_ = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
bool OpenSlesOutput::HandleUnderrun(int event_id, int event_msg) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user