diff mbox series

[FFmpeg-devel,1/5] lavc/libkvazaar: fix framerate setting

Message ID 1595763675-1857-1-git-send-email-mypopydev@gmail.com
State Superseded
Headers show
Series [FFmpeg-devel,1/5] lavc/libkvazaar: fix framerate setting
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Jun Zhao July 26, 2020, 11:41 a.m. UTC
From: Jun Zhao <barryjzhao@tencent.com>

fix framerate setting.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
---
 libavcodec/libkvazaar.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/libkvazaar.c b/libavcodec/libkvazaar.c
index 02bcae3..71c9c8f 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,