summaryrefslogtreecommitdiffstats
path: root/libavcodec/vc2enc.c
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2016-02-28 19:05:15 +0000
committerRostislav Pehlivanov <atomnuker@gmail.com>2016-02-28 19:06:29 +0000
commit2f19583911eb4d67afaa72ec2bdbef583087f3f7 (patch)
tree8451c43f1b78034517806e7badc0523920f21b92 /libavcodec/vc2enc.c
parent6e5c6d61bddab12b1d9002ac422cbd2506a30177 (diff)
downloadffmpeg-streaming-2f19583911eb4d67afaa72ec2bdbef583087f3f7.zip
ffmpeg-streaming-2f19583911eb4d67afaa72ec2bdbef583087f3f7.tar.gz
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>
Diffstat (limited to 'libavcodec/vc2enc.c')
-rw-r--r--libavcodec/vc2enc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c
index 27db6c0..01cb6a5 100644
--- a/libavcodec/vc2enc.c
+++ b/libavcodec/vc2enc.c
@@ -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;
OpenPOWER on IntegriCloud