jcodec/jcodec — pull request #20 by piotr3k (2013-06-16 20:58:40+00:00)
Title: ArrayIndexOutOfBoundsException while using gotoFrame() method

Fix issue with gotoFrame method. If frameNo is greater than index of last IDR sample (sync sample) in video track, method throws ArrayIndexOutOfBoundsException.
Proposed code guarantees that syncSamples array is never going to be read out of bounds.