Use lsmash_malloc/lsmash_realloc/lsmash_free() instead of malloc/free/realloc().