avidec: move eof check before continue.