[x264-devel] Fix overread/possible crash with intra refresh + VBV
Anton Mitrofanov
git at videolan.org
Sat Feb 4 21:10:45 CET 2012
x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Mon Jan 16 14:02:53 2012 -0800| [1ab0877a40417a2f4f26ff0356e8b02182d9d996] | committer: Jason Garrett-Glaser
Fix overread/possible crash with intra refresh + VBV
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=1ab0877a40417a2f4f26ff0356e8b02182d9d996
---
encoder/encoder.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/encoder/encoder.c b/encoder/encoder.c
index 7d0b557..21f3198 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;
+ }
}
}
More information about the x264-devel
mailing list