mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 19:58:59 +00:00
Avoid the use of an intermediary variable in
av_parse_video_rate(). Simplify. Originally committed as revision 24524 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
c90c80ac28
commit
ea35e3c61e
@ -139,9 +139,7 @@ int av_parse_video_rate(AVRational *rate, const char *arg)
|
||||
rate->num = 0;
|
||||
} else {
|
||||
/* Finally we give up and parse it as double */
|
||||
AVRational time_base = av_d2q(strtod(arg, 0), 1001000);
|
||||
rate->den = time_base.den;
|
||||
rate->num = time_base.num;
|
||||
*rate = av_d2q(strtod(arg, 0), 1001000);
|
||||
}
|
||||
if (rate->num <= 0 || rate->den <= 0)
|
||||
return AVERROR(EINVAL);
|
||||
|
Loading…
Reference in New Issue
Block a user