diff options
author | Kenny Root <kroot@google.com> | 2010-02-18 09:03:06 -0800 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2010-02-18 09:03:34 -0800 |
commit | 3cbd62c3cebf0c0c62a50ccc736ac4caa3a4bf64 (patch) | |
tree | 4430745fe19690197445170dd372aef6c6145200 /media | |
parent | c948cc8c8a8a9a751d8252e390e5975d1a763d34 (diff) | |
download | frameworks_base-3cbd62c3cebf0c0c62a50ccc736ac4caa3a4bf64.zip frameworks_base-3cbd62c3cebf0c0c62a50ccc736ac4caa3a4bf64.tar.gz frameworks_base-3cbd62c3cebf0c0c62a50ccc736ac4caa3a4bf64.tar.bz2 |
Store AudioTrack return value for error condition
Store AudioTrack->initCheck()'s return value so we can return it after
the AudioTrack is deleted.
Change-Id: Ie042a7d6a54d7f9afd8a5767cfd167dbeb2e5c04
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/AudioPlayer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/media/libstagefright/AudioPlayer.cpp b/media/libstagefright/AudioPlayer.cpp index 12d7ee2..7997cd6 100644 --- a/media/libstagefright/AudioPlayer.cpp +++ b/media/libstagefright/AudioPlayer.cpp @@ -99,13 +99,13 @@ status_t AudioPlayer::start() { : AudioSystem::CHANNEL_OUT_MONO, 8192, 0, &AudioCallback, this, 0); - if (mAudioTrack->initCheck() != OK) { + if ((err = mAudioTrack->initCheck()) != OK) { delete mAudioTrack; mAudioTrack = NULL; mSource->stop(); - return mAudioTrack->initCheck(); + return err; } mLatencyUs = (int64_t)mAudioTrack->latency() * 1000; |