[−][src]Function flac_sys::FLAC__metadata_object_application_set_data
pub unsafe extern "C" fn FLAC__metadata_object_application_set_data(
object: *mut FLAC__StreamMetadata,
data: *mut FLAC__byte,
length: c_uint,
copy: FLAC__bool
) -> FLAC__bool
Sets the application data of an APPLICATION block.
If \a copy is \c true, a copy of the data is stored; otherwise, the object takes ownership of the pointer. The existing data will be freed if this function is successful, otherwise the original data will remain if \a copy is \c true and malloc() fails.
\note It is safe to pass a const pointer to \a data if \a copy is \c true.
\param object A pointer to an existing APPLICATION object. \param data A pointer to the data to set. \param length The length of \a data in bytes. \param copy See above. \assert \code object != NULL \endcode \code object->type == FLAC__METADATA_TYPE_APPLICATION \endcode \code (data != NULL && length > 0) || (data == NULL && length == 0 && copy == false) \endcode \retval FLAC__bool \c false if \a copy is \c true and malloc() fails, else \c true.