Function av_frame_make_writable

Source
pub unsafe extern "C" fn av_frame_make_writable(
    frame: *mut AVFrame,
) -> i32
Expand description

Ensure that the frame data is writable, avoiding data copy if possible.

Do nothing if the frame is writable, allocate new buffers and copy the data if it is not. Non-refcounted frames behave as non-writable, i.e. a copy is always made.

@return 0 on success, a negative AVERROR on error.

@see av_frame_is_writable(), av_buffer_is_writable(), av_buffer_make_writable()