[FFmpeg-cvslog] avcodec/ratecontrol: give some trivial tips in case of buffer underflows
Michael Niedermayer
git at videolan.org
Sun Sep 8 23:18:20 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Sep 8 23:10:41 2013 +0200| [d8fb170da2e7edbfd250c1d8e1de6b1a0e965170] | committer: Michael Niedermayer
avcodec/ratecontrol: give some trivial tips in case of buffer underflows
See Ticket2725
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d8fb170da2e7edbfd250c1d8e1de6b1a0e965170
---
libavcodec/ratecontrol.c | 3 +++
1 file changed, 3 insertions(+)
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;
}
More information about the ffmpeg-cvslog
mailing list