跳到主要内容

av_opt_copy

搜索

函数 av_opt_copy 

源代码
pub unsafe extern "C" fn av_opt_copy(
    dest: *mut c_void,
    src: *const c_void,
) -> c_int
展开描述

Copy options from src object into dest object.

The underlying AVClass of both src and dest must coincide. The guarantee below does not apply if this is not fulfilled.

Options that require memory allocation (e.g. string or binary) are malloc’ed in dest object. Original memory allocated for such options is freed unless both src and dest options points to the same memory.

Even on error it is guaranteed that allocated options from src and dest no longer alias each other afterwards; in particular calling av_opt_free() on both src and dest is safe afterwards if dest has been memdup’ed from src.

@param dest Object to copy from @param src Object to copy into @return 0 on success, negative on error