moonlight-stream / moonlight-common-c

Core implementation of Nvidia's GameStream protocol
GNU General Public License v3.0
448 stars 166 forks source link

Fix skipping first video packet #8

Closed irtimmer closed 9 years ago

irtimmer commented 9 years ago

Because lastPacketInStream is initialized as 0 and the following code in VideoDepacketizer, the first packet, with sequence number 0, is skipped.

// Drop duplicates or re-ordered packets
streamPacketIndex = videoPacket->streamPacketIndex;
if (isBeforeSignedInt((short) streamPacketIndex, (short) (lastPacketInStream + 1), 0)) {
    return;
}