- clean up the code
- flush codec when done