Menu

#2 NullPointerException PktBuffer: 422

open
nobody
None
5
2008-11-26
2008-11-26
Anonymous
No

If buffering is disalbed (packetBufferBehavior(-1)) the unfilteredAddPkt() method does not increase the lenght of the buffer so the method popFrameQueueCleanup does the wrong cleanup.
The unfilteredAddPkt() method also adds the packet at the wrong end of the queue.

My Solution:
private int unfilteredAddPkt(PktBufNode newNode) {
if(RTPSession.rtpDebugLevel > 8) {
System.out.println("<->PktBuffer.unfilteredAddPkt()");
}
//No magic, just add to the end
if(oldest != null) {
newNode.nextFrameQueueNode = newest;
newest.prevFrameQueueNode = newNode;
newest = newNode;
} else {
oldest = newNode;
newest = newNode;
}
length++;
return 0;
}

Discussion


Log in to post a comment.

MongoDB Logo MongoDB