Merge "fix EOS handling in codec test."