From: Jason Garrett-Glaser Date: Thu, 28 Feb 2013 21:32:37 +0000 (-0800) Subject: Fix undefined behavior in x264_ratecontrol_mb X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=e355b0e12d6cb380c13cdce15b42093eb8eeef44;p=x264.git Fix undefined behavior in x264_ratecontrol_mb --- diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c index 947aeda4..21573018 100644 --- a/encoder/ratecontrol.c +++ b/encoder/ratecontrol.c @@ -1667,7 +1667,8 @@ int x264_ratecontrol_mb( x264_t *h, int bits ) rc->qpm = x264_clip3f( (prev_row_qp + rc->qpm)*0.5f, prev_row_qp + 1.0f, qp_max ); rc->qpa_rc = rc->qpa_rc_prev; rc->qpa_aq = rc->qpa_aq_prev; - h->fdec->i_row_bits[y] = h->fdec->i_row_bits[y-SLICE_MBAFF] = 0; + h->fdec->i_row_bits[y] = 0; + h->fdec->i_row_bits[y-SLICE_MBAFF] = 0; return -1; } } @@ -1683,7 +1684,8 @@ int x264_ratecontrol_mb( x264_t *h, int bits ) rc->qpm = qp_max; rc->qpa_rc = rc->qpa_rc_prev; rc->qpa_aq = rc->qpa_aq_prev; - h->fdec->i_row_bits[y] = h->fdec->i_row_bits[y-SLICE_MBAFF] = 0; + h->fdec->i_row_bits[y] = 0; + h->fdec->i_row_bits[y-SLICE_MBAFF] = 0; return -1; } }