From c8c7512600df8b863a0f196f2f41eb916960f2f8 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 27 Feb 2014 01:31:07 -0500 Subject: [PATCH] Hack around an issue where data gets added after the frame is thrown away --- .../limelight/nvstream/av/video/VideoDepacketizer.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/moonlight-common/src/com/limelight/nvstream/av/video/VideoDepacketizer.java b/moonlight-common/src/com/limelight/nvstream/av/video/VideoDepacketizer.java index 908c8c66..b54d3d45 100644 --- a/moonlight-common/src/com/limelight/nvstream/av/video/VideoDepacketizer.java +++ b/moonlight-common/src/com/limelight/nvstream/av/video/VideoDepacketizer.java @@ -179,9 +179,12 @@ public class VideoDepacketizer { avcFrameDataLength = 0; } - // Add the payload data to the chain - avcFrameDataChain.add(location); - avcFrameDataLength += location.length; + // FIXME: This check shouldn't be needed + if (avcFrameDataChain != null) { + // Add the payload data to the chain + avcFrameDataChain.add(location); + avcFrameDataLength += location.length; + } } public void addInputData(VideoPacket packet)