mirror of
https://github.com/storytold/soundcraft.git
synced 2026-11-03 17:21:21 +00:00
Saturate the reference POC LSB after a memory management op 5
A saturated top POC with a negative bottom field could still overflow here, as CodeRabbit noted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9e768d659b
commit
af4970e388
1 file changed
+1
-1
@@ -532,7 +532,7 @@ impl PocState {
|
||||
if sh.nal_ref_idc != 0 {
|
||||
if mmco5 {
|
||||
self.prev_ref_msb = 0;
|
||||
self.prev_ref_lsb = poc.top - poc.frame();
|
||||
self.prev_ref_lsb = poc.top.saturating_sub(poc.frame());
|
||||
} else {
|
||||
self.prev_ref_msb = poc.msb;
|
||||
self.prev_ref_lsb = sh.pic_order_cnt_lsb as i32;
|
||||
|
||||
Reference in new issue
Block a user