summaryrefslogtreecommitdiff
path: root/libavcodec/codec.h
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-02-20 16:01:52 -0300
committerJames Almer <jamrial@gmail.com>2021-03-12 19:49:08 -0300
commit6e7e3a3820f0888ff92d6be44f40ff733bcce874 (patch)
treef057b934848eeb52d019213018b4fedaeafd61f6 /libavcodec/codec.h
parent2c96e6cb955af3062e78c5b0f9fb907cfb2e59e3 (diff)
avcodec: add a get_encode_buffer() callback to AVCodecContext
This callback is functionally the same as get_buffer2() is for decoders, and implements for the new encode API the functionality of the old encode API had where the user could provide their own buffers. Reviewed-by: Lynne <dev@lynne.ee> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/codec.h')
-rw-r--r--libavcodec/codec.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/codec.h b/libavcodec/codec.h
index 729df0e304..1bb70260ac 100644
--- a/libavcodec/codec.h
+++ b/libavcodec/codec.h
@@ -43,9 +43,11 @@
*/
#define AV_CODEC_CAP_DRAW_HORIZ_BAND (1 << 0)
/**
- * Codec uses get_buffer() for allocating buffers and supports custom allocators.
- * If not set, it might not use get_buffer() at all or use operations that
- * assume the buffer was allocated by avcodec_default_get_buffer.
+ * Codec uses get_buffer() or get_encode_buffer() for allocating buffers and
+ * supports custom allocators.
+ * If not set, it might not use get_buffer() or get_encode_buffer() at all, or
+ * use operations that assume the buffer was allocated by
+ * avcodec_default_get_buffer2 or avcodec_default_get_encode_buffer.
*/
#define AV_CODEC_CAP_DR1 (1 << 1)
#define AV_CODEC_CAP_TRUNCATED (1 << 3)