You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +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:
@@ -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->bit_rate = av_rescale(min_bits_per_frame, avctx->time_base.den,
|
||||||
avctx->time_base.num);
|
avctx->time_base.num);
|
||||||
av_log(avctx, AV_LOG_WARNING,
|
av_log(avctx, AV_LOG_WARNING,
|
||||||
"Bitrate too low, clipping to minimum = %.2lf Mbps!\n",
|
"Bitrate too low, clipping to minimum = %li Mbps!\n",
|
||||||
(double)avctx->bit_rate/1000000.0f);
|
avctx->bit_rate/1000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user