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

Commit a03f7173 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "CCodec: translate C2_NO_MEMORY to NO_MEMORY in onError callback"

parents 6ae3b227 10f33c00
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -552,13 +552,15 @@ struct CCodec::ClientListener : public Codec2Client::Listener {
        }

        // Report to MediaCodec
        // Note: for now we do not propagate the error code to MediaCodec as we would need
        // to translate to a MediaCodec error.
        // Note: for now we do not propagate the error code to MediaCodec
        // except for C2_NO_MEMORY, as we would need to translate to a MediaCodec error.
        sp<CCodec> codec(mCodec.promote());
        if (!codec || !codec->mCallback) {
            return;
        }
        codec->mCallback->onError(UNKNOWN_ERROR, ACTION_CODE_FATAL);
        codec->mCallback->onError(
                errorCode == C2_NO_MEMORY ? NO_MEMORY : UNKNOWN_ERROR,
                ACTION_CODE_FATAL);
    }

    virtual void onDeath(