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

Commit 566da808 authored by Wei Jia's avatar Wei Jia
Browse files

NuPlayer: do not create audio decoder if the player is still in shutdown process.

Bug: 23350795
Change-Id: I46b02cf31d7d4447806910a9ecd8c3bda05f2f5b
parent 3a124eb0
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1488,7 +1488,9 @@ void NuPlayer::determineAudioModeChange() {
}

status_t NuPlayer::instantiateDecoder(bool audio, sp<DecoderBase> *decoder) {
    if (*decoder != NULL) {
    // The audio decoder could be cleared by tear down. If still in shut down
    // process, no need to create a new audio decoder.
    if (*decoder != NULL || (audio && mFlushingAudio == SHUT_DOWN)) {
        return OK;
    }