diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-10-21 22:07:01 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-10-21 22:07:01 +0000 |
commit | 5dc49706612fe923b3395a6462afa0af2da3b494 (patch) | |
tree | f81b141d5e416396404f696727e65b13f5bef83d /libavcodec | |
parent | 71bd023da5e83e3f65e068d0b12bf5b45050d2d5 (diff) | |
download | ffmpeg-5dc49706612fe923b3395a6462afa0af2da3b494.tar.gz |
prevent infinite loop
Originally committed as revision 6753 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpegvideo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 9b6b2b2f9c..bc8ad7fb57 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -2536,7 +2536,7 @@ vbv_retry: int max_size= rcc->buffer_index/3; if(put_bits_count(&s->pb) > max_size && s->qscale < s->avctx->qmax){ - s->next_lambda= s->lambda*(s->qscale+1) / s->qscale; + s->next_lambda= FFMAX(s->lambda+1, s->lambda*(s->qscale+1) / s->qscale); s->mb_skipped = 0; //done in MPV_frame_start() if(s->pict_type==P_TYPE){ //done in encode_picture() so we must undo it if(s->flipflop_rounding || s->codec_id == CODEC_ID_H263P || s->codec_id == CODEC_ID_MPEG4) |