This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/9.0 in repository ffmpeg.
commit afadceaed480d514f5c68ac919eb9192a557f51c Author: Romain Beauxis <[email protected]> AuthorDate: Sun Nov 1 10:54:42 2026 -0600 Commit: Michael Niedermayer <[email protected]> CommitDate: Tue Nov 24 22:01:01 2026 +0100 avcodec/opus/rc: avoid a 32-bit shift when flushing raw bits ff_opus_rc_enc_end() pads the raw bits to a full word, which asks ff_opus_rc_put_raw() for 32 bits when the cache is empty and shifts a 32-bit value by 32. Use the value whole when all 32 bits fit, which writes the same output without the undefined shift that aborts with --assert-level=2. (cherry picked from commit b21727ae6f097b9ca31cd0167e2d006dc9c09e63) Signed-off-by: Michael Niedermayer <[email protected]> --- libavcodec/opus/rc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/opus/rc.c b/libavcodec/opus/rc.c index 57ac272934..f64078af3d 100644 --- a/libavcodec/opus/rc.c +++ b/libavcodec/opus/rc.c @@ -163,7 +163,7 @@ void ff_opus_rc_put_raw(OpusRangeCoder *rc, uint32_t val, uint32_t count) const int to_write = FFMIN(32 - rc->rb.cachelen, count); rc->total_bits += count; - rc->rb.cacheval |= av_zero_extend(val, to_write) << rc->rb.cachelen; + rc->rb.cacheval |= (to_write < 32 ? av_zero_extend(val, to_write) : val) << rc->rb.cachelen; rc->rb.cachelen = (rc->rb.cachelen + to_write) % 32; if (!rc->rb.cachelen && count) { @@ -171,7 +171,7 @@ void ff_opus_rc_put_raw(OpusRangeCoder *rc, uint32_t val, uint32_t count) rc->rb.bytes += 4; rc->rb.position -= 4; rc->rb.cachelen = count - to_write; - rc->rb.cacheval = av_zero_extend(val >> to_write, rc->rb.cachelen); + rc->rb.cacheval = to_write < 32 ? av_zero_extend(val >> to_write, rc->rb.cachelen) : 0; av_assert0(rc->rng_cur < rc->rb.position); } } -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
