From: Anton Mitrofanov Date: Mon, 16 Jan 2012 22:02:53 +0000 (-0800) Subject: Fix overread/possible crash with intra refresh + VBV X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=1ab0877a40417a2f4f26ff0356e8b02182d9d996;p=x264.git Fix overread/possible crash with intra refresh + VBV --- diff --git a/encoder/encoder.c b/encoder/encoder.c index 7d0b5574..21f31983 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -2899,7 +2899,10 @@ int x264_encoder_encode( x264_t *h, h->fdec->i_pir_end_col = h->fdec->f_pir_position+0.5; /* If our intra refresh has reached the right side of the frame, we're done. */ if( h->fdec->i_pir_end_col >= h->mb.i_mb_width - 1 ) + { h->fdec->f_pir_position = h->mb.i_mb_width; + h->fdec->i_pir_end_col = h->mb.i_mb_width - 1; + } } }