Replace various inlined inverse AVRational with av_inv_q().
This commit is contained in:
parent
ad55244c96
commit
16dc5f2050
10 changed files with 12 additions and 13 deletions
|
@ -2670,7 +2670,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
|
|||
if (st->time_base.den > 0)
|
||||
t = av_rescale_q(st->info->codec_info_duration, st->time_base, AV_TIME_BASE_Q);
|
||||
if (st->avg_frame_rate.num > 0)
|
||||
t = FFMAX(t, av_rescale_q(st->codec_info_nb_frames, (AVRational){st->avg_frame_rate.den, st->avg_frame_rate.num}, AV_TIME_BASE_Q));
|
||||
t = FFMAX(t, av_rescale_q(st->codec_info_nb_frames, av_inv_q(st->avg_frame_rate), AV_TIME_BASE_Q));
|
||||
|
||||
if (t >= ic->max_analyze_duration) {
|
||||
av_log(ic, AV_LOG_WARNING, "max_analyze_duration %d reached at %"PRId64"\n", ic->max_analyze_duration, t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue