[][src]Function flac_sys::FLAC__metadata_object_picture_set_mime_type

pub unsafe extern "C" fn FLAC__metadata_object_picture_set_mime_type(
    object: *mut FLAC__StreamMetadata,
    mime_type: *mut c_char,
    copy: FLAC__bool
) -> FLAC__bool

Sets the MIME type of a PICTURE block.

If \a copy is \c true, a copy of the string is stored; otherwise, the object takes ownership of the pointer. The existing string will be freed if this function is successful, otherwise the original string will remain if \a copy is \c true and malloc() fails.

\note It is safe to pass a const pointer to \a mime_type if \a copy is \c true.

\param object A pointer to an existing PICTURE object. \param mime_type A pointer to the MIME type string. The string must be ASCII characters 0x20-0x7e, NUL-terminated. No validation is done. \param copy See above. \assert \code object != NULL \endcode \code object->type == FLAC__METADATA_TYPE_PICTURE \endcode \code (mime_type != NULL) \endcode \retval FLAC__bool \c false if \a copy is \c true and malloc() fails, else \c true.