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

Commit 96b21cbc authored by Wonsik Kim's avatar Wonsik Kim Committed by Android (Google) Code Review
Browse files

Merge "codec2: don't extract headers if asked to prepend them on IDR"

parents 11c95718 8ab25aad
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1075,8 +1075,7 @@ status_t CCodecBufferChannel::start(
                    outputGeneration);
        }

        if (oStreamFormat.value == C2BufferData::LINEAR
                && mComponentName.find("c2.qti.") == std::string::npos) {
        if (oStreamFormat.value == C2BufferData::LINEAR) {
            // WORKAROUND: if we're using early CSD workaround we convert to
            //             array mode, to appease apps assuming the output
            //             buffers to be of the same size.
@@ -1128,8 +1127,9 @@ status_t CCodecBufferChannel::requestInitialInputBuffers() {
    }

    C2StreamBufferTypeSetting::output oStreamFormat(0u);
    c2_status_t err = mComponent->query({ &oStreamFormat }, {}, C2_DONT_BLOCK, nullptr);
    if (err != C2_OK) {
    C2PrependHeaderModeSetting prepend(PREPEND_HEADER_TO_NONE);
    c2_status_t err = mComponent->query({ &oStreamFormat, &prepend }, {}, C2_DONT_BLOCK, nullptr);
    if (err != C2_OK && err != C2_BAD_INDEX) {
        return UNKNOWN_ERROR;
    }
    size_t numInputSlots = mInput.lock()->numSlots;
@@ -1169,7 +1169,7 @@ status_t CCodecBufferChannel::requestInitialInputBuffers() {
                            mName, buffer->capacity(), config->size());
                }
            } else if (oStreamFormat.value == C2BufferData::LINEAR && i == 0
                    && mComponentName.find("c2.qti.") == std::string::npos) {
                        && (!prepend || prepend.value == PREPEND_HEADER_TO_NONE)) {
                // WORKAROUND: Some apps expect CSD available without queueing
                //             any input. Queue an empty buffer to get the CSD.
                buffer->setRange(0, 0);