av_parse_ratio

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 @paramin str the string to parse: it has to be a string in the format num:den, a float number or an expression @paramin max the maximum allowed numerator and denominator @paramin log_offset log level offset which is applied to the log level of log_ctx @paramin log_ctx parent logging context @return >= 0 on success, a negative error code otherwise

extern (C) @nogc nothrow
int
av_parse_ratio
(,
const(char)* str
,
int max
,,
void* log_ctx
)

Meta