1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-10-07 10:21:53 +02:00

2enc: clip and warn when user bitrate set too low

The encoder crashed on verly low bitrates since there wasn't enough
space allocated.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
This commit is contained in:
Rostislav Pehlivanov 2016-02-28 19:05:15 +00:00
parent 6e5c6d61bd
commit 2f19583911

View File

@ -1180,8 +1180,8 @@ static av_cold int vc2_encode_init(AVCodecContext *avctx)
avctx->bit_rate = av_rescale(min_bits_per_frame, avctx->time_base.den,
avctx->time_base.num);
av_log(avctx, AV_LOG_WARNING,
"Bitrate too low, clipping to minimum = %.2lf Mbps!\n",
(double)avctx->bit_rate/1000000.0f);
"Bitrate too low, clipping to minimum = %li Mbps!\n",
avctx->bit_rate/1000000);
}
return 0;