Commit 27dfe54e authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/libxavs: fix division by 0 bitrate

Fixes CID1257655
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a03f72e7
......@@ -325,6 +325,7 @@ static av_cold int XAVS_init(AVCodecContext *avctx)
if (avctx->level > 0)
x4->params.i_level_idc = avctx->level;
if (avctx->bit_rate > 0)
x4->params.rc.f_rate_tolerance =
(float)avctx->bit_rate_tolerance/avctx->bit_rate;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment