summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-01-31 11:07:50 +0100
committerAnton Khirnov <anton@khirnov.net>2023-02-04 13:14:20 +0100
commitd02340b9e3e72f401cddbeb3bcc3cb584902b886 (patch)
tree8110386a956be87c091e31a6e23bf773c2b3e5ac /libavcodec/avcodec.h
parent82da22066c0818b606812d479674929a229386e2 (diff)
lavc/decode: allow using AV_CODEC_FLAG_COPY_OPAQUE for decoding
Use it to propagate AVPacket.opaque[_ref] to corresponding AVFrame fields. This is a more convenient alternative to reordered_opaque.
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 90b437ccbe..eba9ea73d7 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -242,9 +242,15 @@ typedef struct RcOverride{
*/
#define AV_CODEC_FLAG_RECON_FRAME (1 << 6)
/**
+ * @par decoding
+ * Request the decoder to propagate each packets AVPacket.opaque and
+ * AVPacket.opaque_ref to its corresponding output AVFrame.
+ *
+ * @par encoding:
* Request the encoder to propagate each frame's AVFrame.opaque and
* AVFrame.opaque_ref values to its corresponding output AVPacket.
*
+ * @par
* May only be set on encoders that have the
* @ref AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE capability flag.
*
@@ -265,6 +271,9 @@ typedef struct RcOverride{
* .
* When an output packet contains multiple frames, the opaque values will be
* taken from the first of those.
+ *
+ * @note
+ * The converse holds for decoders, with frames and packets switched.
*/
#define AV_CODEC_FLAG_COPY_OPAQUE (1 << 7)
/**