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

Commit 73535857 authored by Andy Hung's avatar Andy Hung
Browse files

NuPlayer: Restrict seek on video texture changes

MediaPlayer::setVideoSurfaceTexture() should generate seek to refresh
display only if player is started and has video.

Bug: 17379148
Bug: 17404923
Change-Id: I5f55dc40943e4419d08be6fdab964b8a2c5ee519
parent adf34bf9
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -541,7 +541,13 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
                        static_cast<NativeWindowWrapper *>(obj.get())));

            if (obj != NULL) {
                if (mStarted && mVideoDecoder != NULL) {
                    // Issue a seek to refresh the video screen only if started otherwise
                    // the extractor may not yet be started and will assert.
                    // If the video decoder is not set (perhaps audio only in this case)
                    // do not perform a seek as it is not needed.
                    mDeferredActions.push_back(new SeekAction(mCurrentPositionUs));
                }

                // If there is a new surface texture, instantiate decoders
                // again if possible.