]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libkvazaar.c
avcodec/cfhd: improve SampleIndex tag output
[ffmpeg] / libavcodec / libkvazaar.c
index a89ca7f74951c0337f1eacc11bf31a5983c80265..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,
@@ -110,8 +105,8 @@ static av_cold int libkvazaar_init(AVCodecContext *avctx)
                            entry->key, entry->value);
                 }
             }
-            av_dict_free(&dict);
         }
+        av_dict_free(&dict);
     }
 
     ctx->encoder = enc = api->encoder_open(cfg);