nDVR skipping chunk following a string of null pointer exceptions
I have the perennial problem of nDVR skipping chunks because of a mis-alignment between the audio and video. However, in my case the skipped chunk is preceded by a string of NullPointerExceptions (see the log entries below). In each case, 4 seconds after the null pointer exceptions, the nDVR skips the chunk. When I watch the recorded event, the recording starts after the last skipped chunk (even though I started the recording at the beginning.)
All of the null pointer exceptions are coming from the DvrPacketHandler class.
Watching the stream live (with the ?DVR in the URL), there is no noticeable mis-alignment (certainly never 2 seconds!). The streams shown in the log (they are both affected) start at 8:20 am, and the recording starts at 8:28 am. The StDominic.stream (a 720p stream) comes up first and the StDominicLQ.stream (a 360p stream) comes up 3 seconds later.
I am pulling these two streams directly from a Grandstream GXV3651_FHD IP camera.
The server runs Ubuntu Linux and has 2-Hex core 3.47Ghz Xeon CPUs with 96GB of ram.