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

Commit e4671134 authored by Wei Jia's avatar Wei Jia Committed by Android (Google) Code Review
Browse files

Merge "NuPlayer: don't feed decoder input data during flushing." into lmp-dev

parents b15486f9 69a85b79
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1180,11 +1180,11 @@ status_t NuPlayer::feedDecoderInputData(bool audio, const sp<AMessage> &msg) {
    sp<AMessage> reply;
    CHECK(msg->findMessage("reply", &reply));

    if ((audio && IsFlushingState(mFlushingAudio))
            || (!audio && IsFlushingState(mFlushingVideo))) {
        reply->setInt32("err", INFO_DISCONTINUITY);
        reply->post();
        return OK;
    if ((audio && mFlushingAudio != NONE
                && mFlushingAudio != AWAITING_DISCONTINUITY)
            || (!audio && mFlushingVideo != NONE
                       && mFlushingVideo != AWAITING_DISCONTINUITY)) {
        return -EWOULDBLOCK;
    }

    sp<ABuffer> accessUnit;