Avoid NPE in ContinuityFixer
This commit is contained in:
parent
c8af7a409a
commit
eb3c878b03
|
@ -85,6 +85,10 @@ public class ContinuityFixer {
|
||||||
* @param tsPacket The packet to fix.
|
* @param tsPacket The packet to fix.
|
||||||
*/
|
*/
|
||||||
public void fixContinuity(MTSPacket tsPacket) {
|
public void fixContinuity(MTSPacket tsPacket) {
|
||||||
|
if(tsPacket == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int pid = tsPacket.getPid();
|
int pid = tsPacket.getPid();
|
||||||
allPackets.put(pid, tsPacket);
|
allPackets.put(pid, tsPacket);
|
||||||
if (!firstPacketsOfCurrentSource.containsKey(pid)) {
|
if (!firstPacketsOfCurrentSource.containsKey(pid)) {
|
||||||
|
|
Loading…
Reference in New Issue