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

Commit 262a5426 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "StageFright: Set input surface default format"

parents eacb2373 9ff03278
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1106,6 +1106,14 @@ status_t GraphicBufferSource::configure(
        consumerUsage |= GRALLOC_USAGE_HW_VIDEO_ENCODER;
        mConsumer->setConsumerUsageBits(consumerUsage);

        // Set impl. defined format as default. Depending on the usage flags
        // the device-specific implementation will derive the exact format.
        err = mConsumer->setDefaultBufferFormat(HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED);
        if (err != NO_ERROR) {
            ALOGE("Failed to configure surface default format ret: %d", err);
            return err;
        }

        // Sets the default buffer data space
        ALOGD("setting dataspace: %#x, acquired=%d", dataSpace, mNumOutstandingAcquires);
        mConsumer->setDefaultBufferDataSpace((android_dataspace)dataSpace);