pub unsafe extern "C" fn sws_scale_frame(
c: *mut SwsContext,
dst: *mut AVFrame,
src: *const AVFrame,
) -> c_int展开描述
Scale source data from src and write the output to dst.
This function can be used directly on an allocated context, without setting
up any frame properties or calling sws_init_context(). Such usage is fully
dynamic and does not require reallocation if the frame properties change.
Alternatively, this function can be called on a context that has been explicitly initialized. However, this is provided only for backwards compatibility. In this usage mode, all frame properties must be correctly set at init time, and may no longer change after initialization.
@param ctx The scaling context.
@param dst The destination frame. The data buffers may either be already
allocated by the caller or left clear, in which case they will
be allocated by the scaler. The latter may have performance
advantages - e.g. in certain cases some (or all) output planes
may be references to input planes, rather than copies.
@param src The source frame. If the data buffers are set to NULL, then
this function behaves identically to sws_frame_setup.
@return >= 0 on success, a negative AVERROR code on failure.