Quantcast
Channel: Embedded Software (Read Only)
Viewing all articles
Browse latest Browse all 25965

Forum Post: RE: H.264 decoder buffers leak

$
0
0

Hi Paula,

Newer release just hangs with this input. Also my original implementation of lock reports assertion error:

int32_t TranscodeComponent_lockAcquire(int32_t user_id, void* lockHandle)
{
    assert(lockHandle != NULL);

    int32_t* lockUserId = (int32_t*) lockHandle;
    GateMP_Handle gate = GlobalGates_getTranscodeComponentGate();

    while (1) {
        IArg gateKey = GateMP_enter(gate);

        Cache_inv(lockUserId, sizeof(*lockUserId), Cache_Type_ALL, TRUE);

        if (*lockUserId == -1) { // Lock is released
            *lockUserId = user_id;
            Cache_wb(lockUserId, sizeof(*lockUserId), Cache_Type_ALL, TRUE);
            GateMP_leave(gate, gateKey);
            return IVIDMC3_LOCK_ERROR_NONE;
        } else {
            assert(*lockUserId != user_id);
        }

        GateMP_leave(gate, gateKey);

        // Wait until lock is released
        do {
            Cache_inv(lockUserId, sizeof(*lockUserId), Cache_Type_ALL, TRUE);
        } while (*lockUserId != -1);
    }
}

assert(*lockUserId != user_id) - means that decoder tries to acquire lock twice.

Regards,

Andrey Lisnevich


Viewing all articles
Browse latest Browse all 25965


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>