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

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

Merge "MediaCodec: set state to UNINITIALIZED when receiving fatal error." into lmp-dev

parents b6b927fc c22c6956
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -220,6 +220,8 @@ status_t NuPlayer::Decoder::getInputBuffers(Vector<sp<ABuffer> > *buffers) const

void NuPlayer::Decoder::handleError(int32_t err)
{
    mCodec->release();

    sp<AMessage> notify = mNotify->dup();
    notify->setInt32("what", kWhatError);
    notify->setInt32("err", err);
+4 −2
Original line number Diff line number Diff line
@@ -733,13 +733,15 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {

                        case CONFIGURING:
                        {
                            setState(INITIALIZED);
                            setState(actionCode == ACTION_CODE_FATAL ?
                                    UNINITIALIZED : INITIALIZED);
                            break;
                        }

                        case STARTING:
                        {
                            setState(CONFIGURED);
                            setState(actionCode == ACTION_CODE_FATAL ?
                                    UNINITIALIZED : CONFIGURED);
                            break;
                        }