lavc/libx264: Cast bit_rate to int64_t to avoid an integer overflow.
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>
Sat, 10 Aug 2019 15:10:58 +0000 (17:10 +0200)
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>
Sat, 10 Aug 2019 21:29:58 +0000 (23:29 +0200)
Fixes ticket #8071.

libavcodec/libx264.c

index 01f9455..eeffb83 100644 (file)
@@ -902,7 +902,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
     if (avctx->max_b_frames < 0)
         avctx->max_b_frames = 0;
 
-    avctx->bit_rate = x4->params.rc.i_bitrate*1000;
+    avctx->bit_rate = x4->params.rc.i_bitrate*1000LL;
 
     x4->enc = x264_encoder_open(&x4->params);
     if (!x4->enc)