[][src]Function libaom_sys::aom_img_metadata_alloc

pub unsafe extern "C" fn aom_img_metadata_alloc(
    type_: u32,
    data: *const u8,
    sz: usize,
    insert_flag: aom_metadata_insert_flags_t
) -> *mut aom_metadata_t

Allocate memory for aom_metadata struct.

Allocates storage for the metadata payload, sets its type and copies the payload data into the aom_metadata struct. A metadata payload buffer of size sz is allocated and sz bytes are copied from data into the payload buffer.

\param[in] type Metadata type \param[in] data Metadata data pointer \param[in] sz Metadata size \param[in] insert_flag Metadata insert flag

\return Returns the newly allocated aom_metadata struct. If data is NULL, sz is 0, or memory allocation fails, it returns NULL.