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

Commit 16513e84 authored by Robert Shih's avatar Robert Shih Committed by Android Git Automerger
Browse files

am f4ba6193: am a2981013: NuPlayer: fix av discontinuity race

* commit 'f4ba6193':
  NuPlayer: fix av discontinuity race
parents 1c650b8d f4ba6193
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -1230,7 +1230,6 @@ status_t NuPlayer::feedDecoderInputData(bool audio, const sp<AMessage> &msg) {
                mTimeDiscontinuityPending =
                    mTimeDiscontinuityPending || timeChange;

                if (formatChange || timeChange) {
                if (mFlushingAudio == NONE && mFlushingVideo == NONE) {
                    // And we'll resume scanning sources once we're done
                    // flushing.
@@ -1239,6 +1238,8 @@ status_t NuPlayer::feedDecoderInputData(bool audio, const sp<AMessage> &msg) {
                                &NuPlayer::performScanSources));
                }

                if (formatChange || timeChange) {

                    sp<AMessage> newFormat = mSource->getFormat(audio);
                    sp<Decoder> &decoder = audio ? mAudioDecoder : mVideoDecoder;
                    if (formatChange && !decoder->supportsSeamlessFormatChange(newFormat)) {