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

Commit 06d56450 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

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

Merge "CCodec: translate C2_NO_MEMORY to NO_MEMORY in onError callback" am: a03f7173 am: 0e57afcf am: a91c90c5

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1619564

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id39f67740fe097aaa650cbae2f026012f181245e
parents aff5ddaa a91c90c5
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(