diff options
author | Wan-Teh Chang <wtc@google.com> | 2023-03-23 14:50:10 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2023-05-04 22:08:21 -0700 |
commit | 601a98b1542fa1fb439c715a9e2e8559338d33f8 (patch) | |
tree | 70c97495250029f204b4f6aae510375ad82c164e /vpx/vpx_encoder.h | |
parent | 3580bc559a223818a29c263e8b59d72ce56dddd5 (diff) | |
download | libvpx-601a98b1542fa1fb439c715a9e2e8559338d33f8.tar.gz |
Add comments about vpx_codec_enc_init_ver failure
Address the questions:
1. If vpx_codec_enc_init_ver() fails, should I still call
vpx_codec_destroy() on the encoder context?
2. Is it safe to call vpx_codec_error_detail() when
vpx_codec_enc_init_ver() failed?
Change-Id: I1b0e090d11dd9f853fe203f4cbb6080c3c7b0506
Diffstat (limited to 'vpx/vpx_encoder.h')
-rw-r--r-- | vpx/vpx_encoder.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vpx/vpx_encoder.h b/vpx/vpx_encoder.h index a7f1552de..2de808973 100644 --- a/vpx/vpx_encoder.h +++ b/vpx/vpx_encoder.h @@ -877,7 +877,7 @@ typedef struct vpx_svc_parameters { /*!\brief Initialize an encoder instance * - * Initializes a encoder context using the given interface. Applications + * Initializes an encoder context using the given interface. Applications * should call the vpx_codec_enc_init convenience macro instead of this * function directly, to ensure that the ABI version number parameter * is properly initialized. @@ -886,6 +886,9 @@ typedef struct vpx_svc_parameters { * is not thread safe and should be guarded with a lock if being used * in a multithreaded context. * + * If vpx_codec_enc_init_ver() fails, it is not necessary to call + * vpx_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. * \param[in] cfg Configuration to use, if known. May be NULL. |