Basically, I just aded a boolean field and use that to manage when to break out of loop/video after one image was capture.
while (reader.readPacket() == null) {
if (!takeImage) {
reader.removeListener(this);
break;
}
}