summaryrefslogtreecommitdiff
path: root/libavcodec/libkvazaar.c
diff options
context:
space:
mode:
authorJun Zhao <barryjzhao@tencent.com>2020-07-26 18:51:19 +0800
committerJun Zhao <barryjzhao@tencent.com>2020-08-02 11:24:45 +0800
commit21e86a12e6ae3e977ba78edf23689be1c4219d71 (patch)
tree161f8409b26a69ccea2caadd2d5a33844ae7b1f7 /libavcodec/libkvazaar.c
parent15ef16dce8b69200a972a0ea6aa9026ab79e09ad (diff)
downloadffmpeg-21e86a12e6ae3e977ba78edf23689be1c4219d71.tar.gz
lavc/libkvazaar: fix framerate setting
fix framerate setting. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
Diffstat (limited to 'libavcodec/libkvazaar.c')
-rw-r--r--libavcodec/libkvazaar.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/libavcodec/libkvazaar.c b/libavcodec/libkvazaar.c
index 02bcae3d5c..71c9c8f77c 100644
--- a/libavcodec/libkvazaar.c
+++ b/libavcodec/libkvazaar.c
@@ -80,13 +80,8 @@ static av_cold int libkvazaar_init(AVCodecContext *avctx)
cfg->height = avctx->height;
if (avctx->framerate.num > 0 && avctx->framerate.den > 0) {
- if (avctx->ticks_per_frame > INT_MAX / avctx->framerate.den) {
- av_log(avctx, AV_LOG_ERROR,
- "Could not set framerate for kvazaar: integer overflow\n");
- return AVERROR(EINVAL);
- }
cfg->framerate_num = avctx->framerate.num;
- cfg->framerate_denom = avctx->time_base.den * avctx->ticks_per_frame;
+ cfg->framerate_denom = avctx->framerate.den;
} else {
if (avctx->ticks_per_frame > INT_MAX / avctx->time_base.num) {
av_log(avctx, AV_LOG_ERROR,