Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db995fe3 authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge "Fix getTimestamp if offload thread is not initialized." into lmp-mr1-dev

parents 8790740d 9a1c8892
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -2688,7 +2688,8 @@ status_t AudioFlinger::PlaybackThread::getTimestamp_l(AudioTimestamp& timestamp)
    if (mNormalSink != 0) {
    if (mNormalSink != 0) {
        return mNormalSink->getTimestamp(timestamp);
        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;
        uint64_t position64;
        int ret = mOutput->stream->get_presentation_position(
        int ret = mOutput->stream->get_presentation_position(
                                                mOutput->stream, &position64, &timestamp.mTime);
                                                mOutput->stream, &position64, &timestamp.mTime);