]> git.sesse.net Git - ffmpeg/commitdiff
lavc/libkvazaar: fix framerate setting
authorJun Zhao <barryjzhao@tencent.com>
Sun, 26 Jul 2020 10:51:19 +0000 (18:51 +0800)
committerJun Zhao <barryjzhao@tencent.com>
Sun, 2 Aug 2020 03:24:45 +0000 (11:24 +0800)
fix framerate setting.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
libavcodec/libkvazaar.c

index 02bcae3d5c070a108a7f49174328e1dcf50795ee..71c9c8f77c185875101dc1742fd097be4cee3222 100644 (file)
@@ -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,