]> git.sesse.net Git - x264/commitdiff
Fix overread/possible crash with intra refresh + VBV
authorAnton Mitrofanov <BugMaster@narod.ru>
Mon, 16 Jan 2012 22:02:53 +0000 (14:02 -0800)
committerFiona Glaser <fiona@x264.com>
Sat, 4 Feb 2012 15:16:19 +0000 (07:16 -0800)
encoder/encoder.c

index 378840b1e3a422cca43f74f6a966054ae88d9ad5..5ae3f0a676c78144756ffe75b1d06e6ec4e3caf4 100644 (file)
@@ -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;
+            }
         }
     }