summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-02-11 20:17:31 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-01 18:32:01 +0100
commitcb92b4bd835c005816d97a2c8106a53af43173f0 (patch)
tree073e48bb2d9974d2d1ace0c81a30e4d809b4e060
parent200f82e3f807b67c49e1f04b5eefc5ab421d8712 (diff)
avutil/hwcontext: Clarify documentation of AVHWFramesContext.hwctx
Correct the names of the format-specific headers (not hwframe_*.h) and clarify that the user shall ignore this field if there is no public context associated with it. In particular, this allows to use this field for the private context alone if there is no public context. This can't break conforming API users, because they always have to live with the possibility that a new public context has been introduced. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavutil/hwcontext.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavutil/hwcontext.h b/libavutil/hwcontext.h
index 2b33721a97..df7733fe5e 100644
--- a/libavutil/hwcontext.h
+++ b/libavutil/hwcontext.h
@@ -153,9 +153,12 @@ typedef struct AVHWFramesContext {
* The format-specific data, allocated and freed automatically along with
* this context.
*
- * Should be cast by the user to the format-specific context defined in the
- * corresponding header (hwframe_*.h) and filled as described in the
- * documentation before calling av_hwframe_ctx_init().
+ * The user shall ignore this field if the corresponding format-specific
+ * header (hwcontext_*.h) does not define a context to be used as
+ * AVHWFramesContext.hwctx.
+ *
+ * Otherwise, it should be cast by the user to said context and filled
+ * as described in the documentation before calling av_hwframe_ctx_init().
*
* After any frames using this context are created, the contents of this
* struct should not be modified by the caller.