Closes the decoder instance. This must be called prior to dropping the last reference of the decoder resulting in the call to its destructor. This may already close internally used resources. The decoder instance can no longer be used and all decoding and output related methods will return an error.