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

Commit 77a17ff3 authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "frameworks/av: Syncronize resume and onPauseTimeOut" into jellybean

parents c0eae9f3 2cb834fd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -210,6 +210,7 @@ private:
    MediaBuffer *mInputBuffer;

    Mutex mLock;
    Mutex mResumeLock;

    bool mSeeking;
    bool mReachedEOS;
+2 −0
Original line number Diff line number Diff line
@@ -356,6 +356,7 @@ void LPAPlayer::pause(bool playPendingSamples) {

void LPAPlayer::resume() {
    ALOGV("resume: mPaused %d",mPaused);
    Mutex::Autolock autoLock(mResumeLock);
    if ( mPaused) {
        CHECK(mStarted);
        if (!mIsA2DPEnabled) {
@@ -758,6 +759,7 @@ void LPAPlayer::requestAndWaitForA2DPNotificationThreadExit() {

void LPAPlayer::onPauseTimeOut() {
    ALOGV("onPauseTimeOut");
    Mutex::Autolock autoLock(mResumeLock);
    if (!mPauseEventPending) {
        return;
    }