Merge "fix codec buffer leak in error handling when timestamp goes backward"