Commit 11f9368d8e for aom
commit 11f9368d8e39b821306c642465ad7dfe357d45d5
Author: James Zern <jzern@google.com>
Date: Tue Jan 13 14:00:45 2026 -0800
aom_{encod,decod}er.h: clarify aom_codec_*_init_ver comment
Explicitly note that `aom_codec_destroy()` must be used to free
resources.
Bug: 475394380
Change-Id: I27861c67bb7d2d1e4022650145a39ba96a5566fc
diff --git a/aom/aom_decoder.h b/aom/aom_decoder.h
index ceef0a64f6..c202fe2b0f 100644
--- a/aom/aom_decoder.h
+++ b/aom/aom_decoder.h
@@ -106,6 +106,10 @@ typedef struct aom_codec_dec_cfg {
* call is not thread safe and should be guarded with a lock if being used
* in a multithreaded context.
*
+ * On success, aom_codec_destroy() must be used to free resources allocated for
+ * the decoder context. If aom_codec_dec_init_ver() fails, it is not necessary
+ * to call aom_codec_destroy() on the decoder context.
+ *
* \param[in] ctx Pointer to this instance's context.
* \param[in] iface Pointer to the algorithm interface to use.
* \param[in] cfg Configuration to use, if known. May be NULL.
diff --git a/aom/aom_encoder.h b/aom/aom_encoder.h
index 4b48ceaffb..6fb50eb505 100644
--- a/aom/aom_encoder.h
+++ b/aom/aom_encoder.h
@@ -922,8 +922,9 @@ typedef struct aom_codec_enc_cfg {
* is not thread safe and should be guarded with a lock if being used
* in a multithreaded context.
*
- * If aom_codec_enc_init_ver() fails, it is not necessary to call
- * aom_codec_destroy() on the encoder context.
+ * On success, aom_codec_destroy() must be used to free resources allocated for
+ * the encoder context. If aom_codec_enc_init_ver() fails, it is not necessary
+ * to call aom_codec_destroy() on the encoder context.
*
* \param[in] ctx Pointer to this instance's context.
* \param[in] iface Pointer to the algorithm interface to use.