Got a NullPointerException at PktBuffer method bufferedAddPkt(PktBufNode newNode) line 212:
while(tmpNode.timeStamp > newNode.timeStamp) {
tmpNode = tmpNode.nextFrameQueueNode;
}
tmpNode got null because the newNode will be the last one in the buffer.
My resolution:
...
PktBufNode tmpNode = newest;
while(tmpNode != null &&
tmpNode.timeStamp > newNode.timeStamp) {
tmpNode = tmpNode.nextFrameQueueNode;
}
if (tmpNode == null) {
if (oldest != null)
oldest.nextFrameNode = newNode;
newNode.prevFrameQueueNode = oldest;
oldest = newNode;
} else if( tmpNode.timeStamp == newNode.timeStamp && rtpSession.frameReconstruction && newNode.seqNum != tmpNode.seqNum) {
...
i have met the same bug recently.i guess the loop should add one more constrain that the tempNode should not be null.Cause when the net condition is so poor that the new node is the oldest .then it was compared with the node(null) before the queue head ,which is a logic error.