It's possible for a sequence of packets seqnums like 2, 0, 1, 2 to end up hitting the fast path again after filling in gap of OOS packets. The fast path assumes duplicate packets are caught by the next contiguous sequence number check, but this is only true if that value is kept updated. Since the slow path doesn't update the next contiguous sequence number, it's no longer safe to use the fast path for the remaining packets in the frame because duplicate packets would be mishandled. Queuing duplicate packets violates all sorts of queue assumptions and can cause us to return corrupt data to the decoder or attempt an FEC recovery without enough shards.
Moonlight Streaming Core Library
Moonlight-common-c contains the core GameStream client code shared between Moonlight clients, including Moonlight PC, Moonlight Android, Moonlight iOS, and Moonlight Chrome.
If you are implementing your own Moonlight game streaming client that can use a C library, you probably want the code here.
Note to Developers
Moonlight-common-c requires the specific version of ENet that is bundled as a submodule. This version has changes required for IPv6 compatibility and retransmission reliability, among other things. These are breaking API/ABI changes which make Moonlight-common-c incompatible with other versions of the ENet library. Attempting to runtime link to another libenet library will cause your client to crash when connecting to recent versions of GeForce Experience.