We hit repeated jitter-buffer crashes in production on NULL mp->ssrc_in / mp->ssrc_out — reported earlier as GitHub issues
#2112 and
#2124. The
#2124 fix added a NULL guard to codec_calc_lost(), which tells us these pointers can legitimately be NULL at handler time.
Reading the code around that fix (at mr14.1.1.15), we noticed a few nearby dereferences of the same pointers that don't seem to have a similar guard, and we're unsure whether they're actually reachable with NULL or safe by an invariant we're missing. The two we're most unsure about:
- handler_func_passthrough_ssrc — dereferences ssrc_in/ssrc_out a few lines after the codec_calc_lost guard in the same function.
- __delay_frame_process — on the delay/jitter timer path; we're wondering if a frame buffered while its SSRC is still unresolved could carry a NULL through to the timer thread.
Are these protected by something we can't see, or worth guarding? We were never able to reproduce this in testing — it only ever showed up under production traffic, which is why we're asking here rather than sending a repro.