)]}'
{
  "commit": "99e9d87feaa1dbfc16f22aad89d78415983450c1",
  "tree": "9f3f314775446e5042c4a4b8667f0a3a202171f9",
  "parents": [
    "b943e775d7aff3780135e361fe47ff2ff0138105"
  ],
  "author": {
    "name": "Tomohiro Matsuzawa",
    "email": "mabtomoh@amazon.com",
    "time": "Thu Jun 18 11:43:32 2026"
  },
  "committer": {
    "name": "webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "email": "webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Mon Jun 22 09:07:59 2026"
  },
  "message": "Fix video recovery freeze on RTP seq number wrap\n\nAfter a prolonged decode stall on an SFU (where the sender does not\nback off under loss), the 16-bit RTP sequence number can advance by\nmore than half its range. This breaks two independent state machines\nin the video receive pipeline, each freezing video for 60-150s:\n\n1. RtpFrameReferenceFinder wrapper: AheadOf\u003cuint16_t\u003e(cleared_to, seq)\n   misjudges a fresh frame as \"already cleared\" and drops it before it\n   reaches a per-codec finder. Fixed by requiring the 32-bit RTP\n   timestamp (unambiguous over ~6.6 hours at 90 kHz) to also confirm\n   the frame is older before dropping. This is wrap-safe for all frame\n   types and backwards-compatible (callers that pass no timestamp keep\n   the original sequence-number-only behavior).\n\n2. RtpSeqNumOnlyRefFinder: stale GoP entries from before the wrap sit\n   \"ahead\" of the new keyframe in 16-bit space, shadowing upper_bound()\n   lookups so delta frames are dropped (\"has no GoP\"). Fixed by\n   removing GoPs that appear ahead of a newly-arrived keyframe -- a\n   keyframe is the newest frame received, so an \"ahead\" GoP can only be\n   a stale leftover.\n\nBoth fixes address the same root cause (16-bit wrap ambiguity) at\ndifferent pipeline stages and are strictly less aggressive at dropping.\n\nTested: 3 new unit tests in rtp_frame_reference_finder_unittest.cc\n(FrameNotDroppedWhenSeqWrapsButTimestampNewer,\nClearToSeqNumOnlyWithoutTimestamp,\nDeltasNotDroppedByStaleGopAfterSeqNumJump); negative control confirms\nthe GoP test fails without the fix. Validated end-to-end on iOS against\na production SFU: 60-150s freeze plus 80s 1fps tail reduced to\nimmediate full-frame-rate recovery.\n\nBug: webrtc:516639936\nChange-Id: I9790e3cf5cd6590b899de3e32d39f6d573ff205d\nReviewed-on: https://webrtc-review.googlesource.com/c/src/+/477641\nReviewed-by: Erik Språng \u003csprang@webrtc.org\u003e\nReviewed-by: Danil Chapovalov \u003cdanilchap@webrtc.org\u003e\nCommit-Queue: Erik Språng \u003csprang@webrtc.org\u003e\nCr-Commit-Position: refs/heads/main@{#48053}\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "40c7080159246bdd3c24fb86964a47a8577392af",
      "old_mode": 33188,
      "old_path": "modules/video_coding/rtp_frame_reference_finder.cc",
      "new_id": "a24e61e0ddc76da81b44b2a1fde0669cece04442",
      "new_mode": 33188,
      "new_path": "modules/video_coding/rtp_frame_reference_finder.cc"
    },
    {
      "type": "modify",
      "old_id": "04a3eea76b2f4c4ea41b41c948d3a35f7e3f3e3b",
      "old_mode": 33188,
      "old_path": "modules/video_coding/rtp_frame_reference_finder.h",
      "new_id": "3c816741ea0d02d8c1651f57427739ffa46fb8be",
      "new_mode": 33188,
      "new_path": "modules/video_coding/rtp_frame_reference_finder.h"
    },
    {
      "type": "modify",
      "old_id": "30786990ae889645f64db0800c3df93be67286f2",
      "old_mode": 33188,
      "old_path": "modules/video_coding/rtp_frame_reference_finder_unittest.cc",
      "new_id": "cf025f65b7d66b33edfc35b485878c662516fe75",
      "new_mode": 33188,
      "new_path": "modules/video_coding/rtp_frame_reference_finder_unittest.cc"
    },
    {
      "type": "modify",
      "old_id": "3eda2d74bd2af4fb19ce3363db8f8f2f9133063c",
      "old_mode": 33188,
      "old_path": "modules/video_coding/rtp_seq_num_only_ref_finder.cc",
      "new_id": "f372c7c090f9d7ddfff28e61a4a2f1a2354589b5",
      "new_mode": 33188,
      "new_path": "modules/video_coding/rtp_seq_num_only_ref_finder.cc"
    },
    {
      "type": "modify",
      "old_id": "fc176dcf04e8a7de754c54aedc0201dd29f73390",
      "old_mode": 33188,
      "old_path": "video/rtp_video_stream_receiver2.cc",
      "new_id": "1bcb47a10fe297ffe9d6bd365296c7b73559ce51",
      "new_mode": 33188,
      "new_path": "video/rtp_video_stream_receiver2.cc"
    },
    {
      "type": "modify",
      "old_id": "5e38a221b7265af51cfd5d5ffe4911dc1b7f224d",
      "old_mode": 33188,
      "old_path": "video/rtp_video_stream_receiver2.h",
      "new_id": "06e53a6434788d04e8052fa142607f4d2da090c7",
      "new_mode": 33188,
      "new_path": "video/rtp_video_stream_receiver2.h"
    },
    {
      "type": "modify",
      "old_id": "592750523f7ff88107f33c616a9478e93c8f44b3",
      "old_mode": 33188,
      "old_path": "video/rtp_video_stream_receiver2_unittest.cc",
      "new_id": "b5a7bb1fea5e1bc9ebeeee2a43172588ff391d5a",
      "new_mode": 33188,
      "new_path": "video/rtp_video_stream_receiver2_unittest.cc"
    }
  ]
}
