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

Commit 447898bc authored by Lajos Molnar's avatar Lajos Molnar Committed by Android (Google) Code Review
Browse files

Merge "ACodec: only check crop rect on output port" into lmp-dev

parents 1375ac6d 91a3cc00
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -3200,12 +3200,20 @@ status_t ACodec::getPortFormat(OMX_U32 portIndex, sp<AMessage> &notify) {
                                        sizeof(describeParams.sMediaImage)));
                    }

                    if (portIndex != kPortIndexOutput) {
                        // TODO: also get input crop
                        break;
                    }

                    OMX_CONFIG_RECTTYPE rect;
                    InitOMXParams(&rect);
                    rect.nPortIndex = kPortIndexOutput;
                    rect.nPortIndex = portIndex;

                    if (mOMX->getConfig(
                                mNode, OMX_IndexConfigCommonOutputCrop,
                                mNode,
                                (portIndex == kPortIndexOutput ?
                                        OMX_IndexConfigCommonOutputCrop :
                                        OMX_IndexConfigCommonInputCrop),
                                &rect, sizeof(rect)) != OK) {
                        rect.nLeft = 0;
                        rect.nTop = 0;