y4m: use loop to skip frames, avoid 32bit size wrap problems