跳到主要内容

av_frame_make_writable

搜索

函数 av_frame_make_writable 

源代码
pub unsafe extern "C" fn av_frame_make_writable(
    frame: *mut AVFrame,
) -> c_int
展开描述

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()