Merge "Make sure the encoder instance is safely release()'d before its" into klp-dev