summaryrefslogtreecommitdiffstats
path: root/libavcodec/ratecontrol.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-08 23:10:41 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-08 23:11:39 +0200
commitd8fb170da2e7edbfd250c1d8e1de6b1a0e965170 (patch)
treec9a14c8e93ae57629374ed06b15ba22949097335 /libavcodec/ratecontrol.c
parentcd6241b5dfb137178b16ceec2adc225f5a30eec8 (diff)
downloadffmpeg-streaming-d8fb170da2e7edbfd250c1d8e1de6b1a0e965170.zip
ffmpeg-streaming-d8fb170da2e7edbfd250c1d8e1de6b1a0e965170.tar.gz
avcodec/ratecontrol: give some trivial tips in case of buffer underflows
See Ticket2725 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r--libavcodec/ratecontrol.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index bf3321d..7db248e 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -328,6 +328,9 @@ int ff_vbv_update(MpegEncContext *s, int frame_size)
rcc->buffer_index -= frame_size;
if (rcc->buffer_index < 0) {
av_log(s->avctx, AV_LOG_ERROR, "rc buffer underflow\n");
+ if (frame_size > max_rate && s->qscale == s->avctx->qmax) {
+ av_log(s->avctx, AV_LOG_ERROR, "max bitrate possibly too small or try trellis with large lmax or increase qmax\n");
+ }
rcc->buffer_index = 0;
}
OpenPOWER on IntegriCloud