fix frame rate calc error when use time_base.
Unified · Split
| @@ -208,7 +208,7 @@ static int vaapi_encode_mpeg2_init_sequence_params(AVCodecContext *avctx) · 207 unmodified lines | ||
| 208 | 208 | if (avctx->framerate.num > 0 && avctx->framerate.den > 0) |
| 209 | 209 | vseq->frame_rate = (float)avctx->framerate.num / avctx->framerate.den; |
| 210 | 210 | else |
| 211 | − vseq->frame_rate = (float)avctx->time_base.num / avctx->time_base.den; | |
| 211 | + vseq->frame_rate = (float)avctx->time_base.den / avctx->time_base.num; | |
| 212 | 212 | |
| 213 | 213 | vseq->aspect_ratio_information = 1; |
| 214 | 214 | vseq->vbv_buffer_size = avctx->rc_buffer_size / (16 * 1024); |