1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/ratecontrol: give some trivial tips in case of buffer underflows

See Ticket2725

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-09-08 23:10:41 +02:00
parent cd6241b5df
commit d8fb170da2

View File

@ -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;
}