diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-05-31 21:40:22 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-05-31 21:40:22 +0000 |
commit | 0fa9a5ddc73eef121695c5116507f8751e3300b3 (patch) | |
tree | ae6355ff979bb58ed9a543be32f80cfc86bf1f59 /libavcodec | |
parent | fc1f90d4e913befc199789f6eeb6be980a175382 (diff) | |
download | ffmpeg-0fa9a5ddc73eef121695c5116507f8751e3300b3.tar.gz |
check qblur > 1 (prevent assert failure / segfault)
fixes sf bug #797610
Originally committed as revision 9166 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/ratecontrol.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index 41bf8db4a8..24a0ab02a9 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -201,6 +201,10 @@ int ff_rate_control_init(MpegEncContext *s) rcc->pass1_rc_eq_output_sum= 0.001; rcc->pass1_wanted_bits=0.001; + if(s->avctx->qblur > 1.0){ + av_log(s->avctx, AV_LOG_ERROR, "qblur too large\n"); + return -1; + } /* init stuff with the user specified complexity */ if(s->avctx->rc_initial_cplx){ for(i=0; i<60*30; i++){ |