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

Commit b71298ee authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru Committed by android code review
Browse files

Merge "avcenc: Initialize all memory allocated by the CBAVC_Malloc callback function"

parents 0ab18f85 359d8fcd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -213,7 +213,7 @@ typedef void (*FuctionType_FrameUnbind)(void *userData, int);
    memory usage.
\param "size" "Size of requested memory in bytes."
\param "attribute" "Some value specifying types, priority, etc. of the memory."
\return "The address of the allocated memory"
\return "The address of the allocated, zero-initialized memory"
*/
typedef void* (*FunctionType_Malloc)(void *userData, int32 size, int attribute);

+4 −1
Original line number Diff line number Diff line
@@ -133,7 +133,10 @@ inline static void ConvertYUV420SemiPlanarToYUV420Planar(

static void* MallocWrapper(
        void *userData, int32_t size, int32_t attrs) {
    return malloc(size);
    void *ptr = malloc(size);
    if (ptr)
        memset(ptr, 0, size);
    return ptr;
}

static void FreeWrapper(void *userData, void* ptr) {