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

Commit 3db1bb97 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Do not seek when switching to background playback"

parents fb20749b 687a589a
Loading
Loading
Loading
Loading
+9 −8
Original line number Original line Diff line number Diff line
@@ -666,12 +666,13 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
            }
            }


            mDeferredActions.push_back(
            mDeferredActions.push_back(
                    new FlushDecoderAction(FLUSH_CMD_FLUSH /* audio */,
                    new FlushDecoderAction(
                            (obj != NULL ? FLUSH_CMD_FLUSH : FLUSH_CMD_NONE) /* audio */,
                                           FLUSH_CMD_SHUTDOWN /* video */));
                                           FLUSH_CMD_SHUTDOWN /* video */));


            mDeferredActions.push_back(new SetSurfaceAction(surface));
            mDeferredActions.push_back(new SetSurfaceAction(surface));


            if (obj != NULL || mAudioDecoder != NULL) {
            if (obj != NULL) {
                if (mStarted) {
                if (mStarted) {
                    // Issue a seek to refresh the video screen only if started otherwise
                    // Issue a seek to refresh the video screen only if started otherwise
                    // the extractor may not yet be started and will assert.
                    // the extractor may not yet be started and will assert.
@@ -688,13 +689,13 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
                // again if possible.
                // again if possible.
                mDeferredActions.push_back(
                mDeferredActions.push_back(
                        new SimpleAction(&NuPlayer::performScanSources));
                        new SimpleAction(&NuPlayer::performScanSources));
            }


                // After a flush without shutdown, decoder is paused.
                // After a flush without shutdown, decoder is paused.
                // Don't resume it until source seek is done, otherwise it could
                // Don't resume it until source seek is done, otherwise it could
                // start pulling stale data too soon.
                // start pulling stale data too soon.
                mDeferredActions.push_back(
                mDeferredActions.push_back(
                        new ResumeDecoderAction(false /* needNotify */));
                        new ResumeDecoderAction(false /* needNotify */));
            }


            processDeferredActions();
            processDeferredActions();
            break;
            break;