Media codec cleanup