Mercurial > libavcodec.hg
comparison ratecontrol.c @ 5087:6c7f4ece59ed libavcodec
check qblur > 1 (prevent assert failure / segfault)
fixes sf bug #797610
| author | michael |
|---|---|
| date | Thu, 31 May 2007 21:40:22 +0000 |
| parents | 522e52c630bd |
| children | 4dbe6578f811 |
comparison
equal
deleted
inserted
replaced
| 5086:a10ebd496bd9 | 5087:6c7f4ece59ed |
|---|---|
| 199 rcc->short_term_qcount=0.001; | 199 rcc->short_term_qcount=0.001; |
| 200 | 200 |
| 201 rcc->pass1_rc_eq_output_sum= 0.001; | 201 rcc->pass1_rc_eq_output_sum= 0.001; |
| 202 rcc->pass1_wanted_bits=0.001; | 202 rcc->pass1_wanted_bits=0.001; |
| 203 | 203 |
| 204 if(s->avctx->qblur > 1.0){ | |
| 205 av_log(s->avctx, AV_LOG_ERROR, "qblur too large\n"); | |
| 206 return -1; | |
| 207 } | |
| 204 /* init stuff with the user specified complexity */ | 208 /* init stuff with the user specified complexity */ |
| 205 if(s->avctx->rc_initial_cplx){ | 209 if(s->avctx->rc_initial_cplx){ |
| 206 for(i=0; i<60*30; i++){ | 210 for(i=0; i<60*30; i++){ |
| 207 double bits= s->avctx->rc_initial_cplx * (i/10000.0 + 1.0)*s->mb_num; | 211 double bits= s->avctx->rc_initial_cplx * (i/10000.0 + 1.0)*s->mb_num; |
| 208 RateControlEntry rce; | 212 RateControlEntry rce; |
