avcodec/jpeg2000: Check stepsize before using it