From bd825776b3d40ea834bac2352e4359bb3145b367 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 5 Oct 2016 17:31:19 -0700 Subject: [PATCH] Add support for GFE 3.0.7 --- src/VideoDepacketizer.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/VideoDepacketizer.c b/src/VideoDepacketizer.c index 77626cd..c98fb10 100644 --- a/src/VideoDepacketizer.c +++ b/src/VideoDepacketizer.c @@ -507,9 +507,22 @@ void processRtpPayload(PNV_VIDEO_PACKET videoPacket, int length) { lastPacketInStream = streamPacketIndex; // If this is the first packet, skip the frame header (if one exists) - if (firstPacket && AppVersionQuad[0] >= 5) { - currentPos.offset += 8; - currentPos.length -= 8; + if (firstPacket){ + if ((AppVersionQuad[0] > 7) || + (AppVersionQuad[0] == 7 && AppVersionQuad[1] > 1) || + (AppVersionQuad[0] == 7 && AppVersionQuad[1] == 1 && AppVersionQuad[2] >= 320)) { + // Anything over 7.1.320 should use the 12 byte frame header + currentPos.offset += 12; + currentPos.length -= 12; + } + else if (AppVersionQuad[0] >= 5) { + // 5.x to 7.1.310 should use the 8 byte header + currentPos.offset += 8; + currentPos.length -= 8; + } + else { + // Other versions don't have a frame header at all + } } if (firstPacket && isIdrFrameStart(¤tPos))