Set coded_frame to NULL when closing a codec, since it might