diff options
author | Zbigniew Mazur <zbigniew.mazur@sonyericsson.com> | 2012-10-11 13:56:41 +0200 |
---|---|---|
committer | Johan Redestig <johan.redestig@sonymobile.com> | 2012-11-23 09:49:30 +0100 |
commit | 3ac30b696d8f3ae2c6ee87d58acfd71db7c2e808 (patch) | |
tree | 3d95854536391df2820382ef4f6b5b6859a340eb /media/libmedia | |
parent | f0e3acd06af00c07bfb541090b5349618fa67507 (diff) | |
download | frameworks_av-3ac30b696d8f3ae2c6ee87d58acfd71db7c2e808.zip frameworks_av-3ac30b696d8f3ae2c6ee87d58acfd71db7c2e808.tar.gz frameworks_av-3ac30b696d8f3ae2c6ee87d58acfd71db7c2e808.tar.bz2 |
AudioTrack::dump null mCblk check test
This fix is protecting AudioTrack::dump from SIGSEGEV
when calling dumpsys shell command.
Change-Id: I30d136e195a12d6fdad41e14f557b0ad9e59b8a2
Diffstat (limited to 'media/libmedia')
-rw-r--r-- | media/libmedia/AudioTrack.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 362d022..aec8c4a 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -1441,7 +1441,7 @@ status_t AudioTrack::dump(int fd, const Vector<String16>& args) const result.append(" AudioTrack::dump\n"); snprintf(buffer, 255, " stream type(%d), left - right volume(%f, %f)\n", mStreamType, mVolume[0], mVolume[1]); result.append(buffer); - snprintf(buffer, 255, " format(%d), channel count(%d), frame count(%d)\n", mFormat, mChannelCount, mCblk->frameCount); + snprintf(buffer, 255, " format(%d), channel count(%d), frame count(%d)\n", mFormat, mChannelCount, (mCblk == 0) ? 0 : mCblk->frameCount); result.append(buffer); snprintf(buffer, 255, " sample rate(%d), status(%d), muted(%d)\n", (mCblk == 0) ? 0 : mCblk->sampleRate, mStatus, mMuted); result.append(buffer); |