summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Burk <philburk@google.com>2014-08-04 23:30:51 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-04 23:00:18 +0000
commitd0fded31e473e909c018f534d3019fb5168bdcd6 (patch)
tree37ccb125fc92f9ec068bcd05c3c8fe7f469883ce
parentc2320223222fe4507b6d67f6b8b4001d26c77a9c (diff)
parent77cce80fa9d44f1e2a6bc486ad957fbbebfce3b2 (diff)
downloadframeworks_av-d0fded31e473e909c018f534d3019fb5168bdcd6.zip
frameworks_av-d0fded31e473e909c018f534d3019fb5168bdcd6.tar.gz
frameworks_av-d0fded31e473e909c018f534d3019fb5168bdcd6.tar.bz2
Merge "[audio][policy] fix crash when offloadInfo is NULL" into lmp-dev
-rw-r--r--services/audiopolicy/AudioPolicyManager.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/services/audiopolicy/AudioPolicyManager.cpp b/services/audiopolicy/AudioPolicyManager.cpp
index 09595ff..440f5d0 100644
--- a/services/audiopolicy/AudioPolicyManager.cpp
+++ b/services/audiopolicy/AudioPolicyManager.cpp
@@ -709,7 +709,9 @@ audio_io_handle_t AudioPolicyManager::getOutputForDevice(
config.sample_rate = mTestSamplingRate;
config.channel_mask = mTestChannels;
config.format = mTestFormat;
- config.offload_info = *offloadInfo;
+ if (offloadInfo != NULL) {
+ config.offload_info = *offloadInfo;
+ }
status = mpClientInterface->openOutput(0,
&mTestOutputs[mCurOutput],
&config,
@@ -784,7 +786,9 @@ audio_io_handle_t AudioPolicyManager::getOutputForDevice(
config.sample_rate = samplingRate;
config.channel_mask = channelMask;
config.format = format;
- config.offload_info = *offloadInfo;
+ if (offloadInfo != NULL) {
+ config.offload_info = *offloadInfo;
+ }
status = mpClientInterface->openOutput(profile->mModule->mHandle,
&output,
&config,