Zero sized NAL-units should not happen, but if they do, do not infinite loop. Added also a unit test for this case.