Function sws_getCachedContext
pub unsafe extern "C" fn sws_getCachedContext(
context: *mut SwsContext,
srcW: i32,
srcH: i32,
srcFormat: i32,
dstW: i32,
dstH: i32,
dstFormat: i32,
flags: i32,
srcFilter: *mut SwsFilter,
dstFilter: *mut SwsFilter,
param: *const f64,
) -> *mut SwsContext
Expand description
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.