Function av_parse_ratio
pub unsafe extern "C" fn av_parse_ratio(
q: *mut AVRational,
str_: *const i8,
max: i32,
log_offset: i32,
log_ctx: *mut c_void,
) -> i32
Expand description
Parse str and store the parsed ratio in q.
Note that a ratio with infinite (1/0) or negative value is considered valid, so you should check on the returned value if you want to exclude those values.
The undefined value can be expressed using the “0:0” string.
@param[in,out] q pointer to the AVRational which will contain the ratio @param[in] str the string to parse: it has to be a string in the format num:den, a float number or an expression @param[in] max the maximum allowed numerator and denominator @param[in] log_offset log level offset which is applied to the log level of log_ctx @param[in] log_ctx parent logging context @return >= 0 on success, a negative error code otherwise