You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/libxavs: fix division by 0 bitrate
Fixes CID1257655 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -325,8 +325,9 @@ static av_cold int XAVS_init(AVCodecContext *avctx)
|
|||||||
if (avctx->level > 0)
|
if (avctx->level > 0)
|
||||||
x4->params.i_level_idc = avctx->level;
|
x4->params.i_level_idc = avctx->level;
|
||||||
|
|
||||||
x4->params.rc.f_rate_tolerance =
|
if (avctx->bit_rate > 0)
|
||||||
(float)avctx->bit_rate_tolerance/avctx->bit_rate;
|
x4->params.rc.f_rate_tolerance =
|
||||||
|
(float)avctx->bit_rate_tolerance/avctx->bit_rate;
|
||||||
|
|
||||||
if ((avctx->rc_buffer_size) &&
|
if ((avctx->rc_buffer_size) &&
|
||||||
(avctx->rc_initial_buffer_occupancy <= avctx->rc_buffer_size)) {
|
(avctx->rc_initial_buffer_occupancy <= avctx->rc_buffer_size)) {
|
||||||
|
Reference in New Issue
Block a user