What you are describing is not in itself a violation. What matters is where he stopped - if he stopped at the line, as the code requires - he would have complied with the law regardless of whether he stopped on his own volition or because of a car in front of him. But if he stopped sufficiently far from the line, then he should have stopped one more time at the line to comply. The OP can answer how close to the line he thinks he stopped, but it does look like he may have stopped too far from the line for that to count, and that may explain why that was out of sight of the officer.
The code does not specify what it means "at the line" or "before the crosswalk". Is 1 ft before (or after) the line bad? What about 3 ft? How far "before" the crosswalk does one need to stop for it to count? What if the officer testifies that the defendant did actually stop, but too far in the officer's judgment? Then we have an argument what is close enough.

