diff options
author | Glenn Kasten <gkasten@google.com> | 2014-02-05 00:05:44 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-02-05 00:05:44 +0000 |
commit | 7332c37c459f5f382a9e4105d522d1c5a7f6f0b5 (patch) | |
tree | 93b9c7de8edcbc21462b25fb8a443cbc366ede93 /services/audioflinger/AudioFlinger.cpp | |
parent | 2a16afb8dc056877f34124ba5befe75171de930f (diff) | |
parent | 03e9e83c47ab4a518da0a1f36b8f702f59221c95 (diff) | |
download | frameworks_av-7332c37c459f5f382a9e4105d522d1c5a7f6f0b5.zip frameworks_av-7332c37c459f5f382a9e4105d522d1c5a7f6f0b5.tar.gz frameworks_av-7332c37c459f5f382a9e4105d522d1c5a7f6f0b5.tar.bz2 |
Merge "audioflinger: Fix for a deadlock in track creation"
Diffstat (limited to 'services/audioflinger/AudioFlinger.cpp')
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index 1e134d0..7c73b19 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -559,7 +559,7 @@ sp<IAudioTrack> AudioFlinger::createTrack( track = thread->createTrack_l(client, streamType, sampleRate, format, channelMask, frameCount, sharedBuffer, lSessionId, flags, tid, clientUid, &lStatus); - LOG_ALWAYS_FATAL_IF((track != 0) != (lStatus == NO_ERROR)); + LOG_ALWAYS_FATAL_IF((lStatus == NO_ERROR) && (track == 0)); // we don't abort yet if lStatus != NO_ERROR; there is still work to be done regardless // move effect chain to this output thread if an effect on same session was waiting @@ -1340,7 +1340,7 @@ sp<IAudioRecord> AudioFlinger::openRecord( frameCount, lSessionId, IPCThreadState::self()->getCallingUid(), flags, tid, &lStatus); - LOG_ALWAYS_FATAL_IF((recordTrack != 0) != (lStatus == NO_ERROR)); + LOG_ALWAYS_FATAL_IF((lStatus == NO_ERROR) && (recordTrack == 0)); } if (lStatus != NO_ERROR) { |