summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2014-12-08 19:13:54 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-08 19:13:54 +0000
commit900f6535af232298e4a77477907a40f68e8dc61b (patch)
tree73e79999d2cd094243eecc48eaf18e1809072aa1
parent4eb26aa2b549aef5a2e0863a95a5cd2c1138cd7b (diff)
parent561f50de82ce47f11ba8d4f25db1ca1d8467b2a7 (diff)
downloadframeworks_av-900f6535af232298e4a77477907a40f68e8dc61b.zip
frameworks_av-900f6535af232298e4a77477907a40f68e8dc61b.tar.gz
frameworks_av-900f6535af232298e4a77477907a40f68e8dc61b.tar.bz2
am 561f50de: am db995fe3: Merge "Fix getTimestamp if offload thread is not initialized." into lmp-mr1-dev
* commit '561f50de82ce47f11ba8d4f25db1ca1d8467b2a7': Fix getTimestamp if offload thread is not initialized.
-rw-r--r--services/audioflinger/Threads.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index b95bb77..3f4ff3e 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -2688,7 +2688,8 @@ status_t AudioFlinger::PlaybackThread::getTimestamp_l(AudioTimestamp& timestamp)
if (mNormalSink != 0) {
return mNormalSink->getTimestamp(timestamp);
}
- if ((mType == OFFLOAD || mType == DIRECT) && mOutput->stream->get_presentation_position) {
+ if ((mType == OFFLOAD || mType == DIRECT)
+ && mOutput != NULL && mOutput->stream->get_presentation_position) {
uint64_t position64;
int ret = mOutput->stream->get_presentation_position(
mOutput->stream, &position64, &timestamp.mTime);