It was affecting some truncated Switch Opus that were reporting too many samples
Switch Opus uses the same output format that opus_demo writes. Each frame has an 8-byte header. The first 4 bytes contain the length of the frame. The second 4 bytes contain the final state of the range coder. 8299edfc0c/src/opus_demo.c (L658-L681)
8299edfc0c/src/opus_demo.c (L658-L681)