aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/options.c
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/options.c
parent2c96e6cb955af3062e78c5b0f9fb907cfb2e59e3 (diff)
downloadffmpeg-6e7e3a3820f0888ff92d6be44f40ff733bcce874.tar.gz
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/options.c')
-rw-r--r--libavcodec/options.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/options.c b/libavcodec/options.c
index 6e904b61d8..61689b48d9 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -130,6 +130,7 @@ static int init_context_defaults(AVCodecContext *s, const AVCodec *codec)
s->pkt_timebase = (AVRational){ 0, 1 };
s->get_buffer2 = avcodec_default_get_buffer2;
s->get_format = avcodec_default_get_format;
+ s->get_encode_buffer = avcodec_default_get_encode_buffer;
s->execute = avcodec_default_execute;
s->execute2 = avcodec_default_execute2;
s->sample_aspect_ratio = (AVRational){0,1};