From 1ab0877a40417a2f4f26ff0356e8b02182d9d996 Mon Sep 17 00:00:00 2001 From: Anton Mitrofanov Date: Mon, 16 Jan 2012 14:02:53 -0800 Subject: [PATCH] Fix overread/possible crash with intra refresh + VBV --- encoder/encoder.c | 3 +++ 1 file changed, 3 insertions(+) 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; + } } } -- 2.47.3