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

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

Merge "CCodec: GraphicBufferSourceWrapper: fix to apply nBufferCountActual for...

Merge "CCodec: GraphicBufferSourceWrapper: fix to apply nBufferCountActual for deciding number of inputs"
parents 6c6a7a88 8b3bcddb
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -246,8 +246,19 @@ public:
        if (source == nullptr) {
            return NO_INIT;
        }
        constexpr size_t kNumSlots = 16;
        for (size_t i = 0; i < kNumSlots; ++i) {

        size_t numSlots = 4;
        constexpr OMX_U32 kPortIndexInput = 0;

        OMX_PARAM_PORTDEFINITIONTYPE param;
        param.nPortIndex = kPortIndexInput;
        status_t err = mNode->getParameter(OMX_IndexParamPortDefinition,
                                           &param, sizeof(param));
        if (err == OK) {
            numSlots = param.nBufferCountActual;
        }

        for (size_t i = 0; i < numSlots; ++i) {
            source->onInputBufferAdded(i);
        }