[][src]Function stainless_ffmpeg_sys::av_parse_ratio

pub unsafe extern "C" fn av_parse_ratio(
    q: *mut AVRational,
    str: *const c_char,
    max: c_int,
    log_offset: c_int,
    log_ctx: *mut c_void
) -> c_int

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