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

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

Merge "NuPlayer: Discard seeks when source and decoders are NULL" into lmp-dev

parents 3ec9c3d2 adf34bf9
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -1669,6 +1669,14 @@ void NuPlayer::performSeek(int64_t seekTimeUs) {
          seekTimeUs,
          seekTimeUs,
          seekTimeUs / 1E6);
          seekTimeUs / 1E6);


    if (mSource == NULL) {
        // This happens when reset occurs right before the loop mode
        // asynchronously seeks to the start of the stream.
        LOG_ALWAYS_FATAL_IF(mAudioDecoder != NULL || mVideoDecoder != NULL,
                "mSource is NULL and decoders not NULL audio(%p) video(%p)",
                mAudioDecoder.get(), mVideoDecoder.get());
        return;
    }
    mSource->seekTo(seekTimeUs);
    mSource->seekTo(seekTimeUs);
    ++mTimedTextGeneration;
    ++mTimedTextGeneration;


+1 −1
Original line number Original line Diff line number Diff line
@@ -626,7 +626,7 @@ void NuPlayerDriver::notifyListener_l(
    switch (msg) {
    switch (msg) {
        case MEDIA_PLAYBACK_COMPLETE:
        case MEDIA_PLAYBACK_COMPLETE:
        {
        {
            if (mLooping) {
            if (mLooping && mState != STATE_RESET_IN_PROGRESS) {
                mLock.unlock();
                mLock.unlock();
                mPlayer->seekToAsync(0);
                mPlayer->seekToAsync(0);
                mLock.lock();
                mLock.lock();