avformat/utils: always av_reduce r_frame_rate

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Marton Balint 2017-08-17 00:20:01 +02:00
parent 931c0ac95c
commit 7160992431
1 changed files with 2 additions and 2 deletions

View File

@ -3943,8 +3943,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (!st->r_frame_rate.num) { if (!st->r_frame_rate.num) {
if ( avctx->time_base.den * (int64_t) st->time_base.num if ( avctx->time_base.den * (int64_t) st->time_base.num
<= avctx->time_base.num * avctx->ticks_per_frame * (int64_t) st->time_base.den) { <= avctx->time_base.num * avctx->ticks_per_frame * (int64_t) st->time_base.den) {
st->r_frame_rate.num = avctx->time_base.den; av_reduce(&st->r_frame_rate.num, &st->r_frame_rate.den,
st->r_frame_rate.den = avctx->time_base.num * avctx->ticks_per_frame; avctx->time_base.den, (int64_t)avctx->time_base.num * avctx->ticks_per_frame, INT_MAX);
} else { } else {
st->r_frame_rate.num = st->time_base.den; st->r_frame_rate.num = st->time_base.den;
st->r_frame_rate.den = st->time_base.num; st->r_frame_rate.den = st->time_base.num;