[−][src]Function stainless_ffmpeg_sys::sws_getCachedContext
pub unsafe extern "C" fn sws_getCachedContext(
context: *mut SwsContext,
srcW: c_int,
srcH: c_int,
srcFormat: AVPixelFormat,
dstW: c_int,
dstH: c_int,
dstFormat: AVPixelFormat,
flags: c_int,
srcFilter: *mut SwsFilter,
dstFilter: *mut SwsFilter,
param: *const f64
) -> *mut SwsContext
Check if context can be reused, otherwise reallocate a new one.
If context is NULL, just calls sws_getContext() to get a new context. Otherwise, checks if the parameters are the ones already saved in context. If that is the case, returns the current context. Otherwise, frees context and gets a new context with the new parameters.
Be warned that srcFilter and dstFilter are not checked, they are assumed to remain the same.