diff options
| author | 2010-05-27 08:57:23 -0700 | |
|---|---|---|
| committer | 2010-05-27 08:57:23 -0700 | |
| commit | 2cb138dbe89c493547066679e1a8ef1ae0a848de (patch) | |
| tree | 92bf6cf3ac7708b6b0842b1903d52fa979e5d1c4 | |
| parent | 407f98bfcd4c7ba71acf9ec7b7c170ebec8c490b (diff) | |
| parent | 5fb03b876b6749c17d7ee6f41f62c4e5e7d6367e (diff) | |
Merge "After failing to create an AudioTrack, only stop the source if we were the ones starting it." into kraken
| -rw-r--r-- | media/libstagefright/AudioPlayer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/media/libstagefright/AudioPlayer.cpp b/media/libstagefright/AudioPlayer.cpp index bcf246397266..b79ba13a9ba3 100644 --- a/media/libstagefright/AudioPlayer.cpp +++ b/media/libstagefright/AudioPlayer.cpp @@ -87,7 +87,9 @@ status_t AudioPlayer::start(bool sourceAlreadyStarted) { DEFAULT_AUDIOSINK_BUFFERCOUNT, &AudioPlayer::AudioSinkCallback, this); if (err != OK) { - mSource->stop(); + if (!sourceAlreadyStarted) { + mSource->stop(); + } return err; } @@ -108,7 +110,9 @@ status_t AudioPlayer::start(bool sourceAlreadyStarted) { delete mAudioTrack; mAudioTrack = NULL; - mSource->stop(); + if (!sourceAlreadyStarted) { + mSource->stop(); + } return err; } |