diff options
author | Marton Balint <cus@passwd.hu> | 2017-08-17 00:20:01 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2017-08-17 21:02:40 +0200 |
commit | 7160992431b029b31bf407443faeaba86dc755a3 (patch) | |
tree | 7ce6f95a98d2b47cd418392695b97d7406fa3f7c /libavformat/utils.c | |
parent | 931c0ac95cebe62f2bdd53a81bf40e3916be6476 (diff) | |
download | ffmpeg-7160992431b029b31bf407443faeaba86dc755a3.tar.gz |
avformat/utils: always av_reduce r_frame_rate
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 58283616dc..23865c88c4 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3943,8 +3943,8 @@ FF_ENABLE_DEPRECATION_WARNINGS if (!st->r_frame_rate.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) { - st->r_frame_rate.num = avctx->time_base.den; - st->r_frame_rate.den = avctx->time_base.num * avctx->ticks_per_frame; + av_reduce(&st->r_frame_rate.num, &st->r_frame_rate.den, + avctx->time_base.den, (int64_t)avctx->time_base.num * avctx->ticks_per_frame, INT_MAX); } else { st->r_frame_rate.num = st->time_base.den; st->r_frame_rate.den = st->time_base.num; |