aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/decode.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2017-07-01 11:12:44 +0200
committerAnton Khirnov <anton@khirnov.net>2017-07-26 23:23:58 +0200
commit359a8a3e2d1194b52b6c386f94fd0929567dfb67 (patch)
tree28e98962aad413bf35d0fd25149c8a0e711eceb3 /libavcodec/decode.h
parentde77671438c24ffea93398c8dc885d4dd04477de (diff)
downloadffmpeg-359a8a3e2d1194b52b6c386f94fd0929567dfb67.tar.gz
decode: add a method for attaching lavc-internal data to frames
Use the AVFrame.opaque_ref field. The original user's opaque_ref is wrapped in the lavc struct and then unwrapped before the frame is returned to the caller. This new struct will be useful in the following commits.
Diffstat (limited to 'libavcodec/decode.h')
-rw-r--r--libavcodec/decode.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libavcodec/decode.h b/libavcodec/decode.h
index 2f29cf6107..61b53b2445 100644
--- a/libavcodec/decode.h
+++ b/libavcodec/decode.h
@@ -21,9 +21,22 @@
#ifndef AVCODEC_DECODE_H
#define AVCODEC_DECODE_H
+#include "libavutil/buffer.h"
+
#include "avcodec.h"
/**
+ * This struct stores per-frame lavc-internal data and is attached to it via
+ * opaque_ref.
+ */
+typedef struct FrameDecodeData {
+ /**
+ * The original user-set opaque_ref.
+ */
+ AVBufferRef *user_opaque_ref;
+} FrameDecodeData;
+
+/**
* Called by decoders to get the next packet for decoding.
*
* @param pkt An empty packet to be filled with data.