Fix NPE in MarkerProcessor when done

This commit is contained in:
Jonas Herzig
2019-03-13 12:06:35 +01:00
parent 1db94b7871
commit 2d7696b09e

View File

@@ -144,7 +144,11 @@ public class MarkerProcessor {
duration = nextPacket.getTime() - timeOffset; duration = nextPacket.getTime() - timeOffset;
} }
nextPacket = replayInputStream.readPacket(); nextPacket = replayInputStream.readPacket();
progress.accept((float) nextPacket.getTime() / (float) inputDuration); if (nextPacket != null) {
progress.accept((float) nextPacket.getTime() / (float) inputDuration);
} else {
progress.accept(1f);
}
} }
} }