Skip to content

lib_enc/lib_enc.c: Leftovers of BITSTREAM_INDICES_MEMORY

In lib_enc/lib_enc.c, there are two occurrences left of BITSTREAM_INDICES_MEMORY. Occurs in IVAS_ENC_Open() and IVAS_ENC_Close():

IVAS_ENC_Open():

    /*-----------------------------------------------------------------*
     * Allocate and initialize IVAS application encoder handle
     *-----------------------------------------------------------------*/

#ifdef BITSTREAM_INDICES_MEMORY
#define WMC_TOOL_SKIP
    if ( ( *phIvasEnc = (IVAS_ENC_HANDLE) malloc( sizeof( struct IVAS_ENC ) ) ) == NULL )
#undef WMC_TOOL_SKIP
#else
    if ( ( *phIvasEnc = (IVAS_ENC_HANDLE) malloc( sizeof( struct IVAS_ENC ) ) ) == NULL )
#endif
    {
        return IVAS_ERR_FAILED_ALLOC;
    }

IVAS_ENC_Close():

#ifdef BITSTREAM_INDICES_MEMORY
#define WMC_TOOL_SKIP
    free( *phIvasEnc );
#undef WMC_TOOL_SKIP
#else
    free( *phIvasEnc );
#endif

@malenovsky: What to do with them?