mozilla/pdf.js — pull request #5350 by CodingFabian (2014-09-26 21:39:47+00:00)
Title: For JPX decoding only read next packet after checking for byte aligning.

This patch makes the image from #5349 appear correctly, however artefacts
for the last packet seem to still be there.
This patch also optimizes some "in-checks" and adds a few header parsings.