summaryrefslogtreecommitdiff
path: root/libavcodec/encode.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-03-09 11:35:47 +0100
committerAnton Khirnov <anton@khirnov.net>2021-03-16 10:52:27 +0100
commit3f53c848470cb8173699e0bd64e804a19af963f7 (patch)
tree54dd6e4d22d36c555e7fd525c593b5dd85a877d2 /libavcodec/encode.h
parentb334fd39c9c00c739faeece87fa81c980c148a16 (diff)
lavc: factor out encoder init/validation from avcodec_open2()
avcodec_open2() is massive, splitting it makes it more readable. Also, add a missing error code to ticks_per_frame sanity check.
Diffstat (limited to 'libavcodec/encode.h')
-rw-r--r--libavcodec/encode.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/encode.h b/libavcodec/encode.h
index 089c31091c..9af2f42483 100644
--- a/libavcodec/encode.h
+++ b/libavcodec/encode.h
@@ -44,4 +44,10 @@ int ff_encode_get_frame(AVCodecContext *avctx, AVFrame *frame);
*/
int ff_get_encode_buffer(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int flags);
+/*
+ * Perform encoder initialization and validation.
+ * Called when opening the encoder, before the AVCodec.init() call.
+ */
+int ff_encode_preinit(AVCodecContext *avctx);
+
#endif /* AVCODEC_ENCODE_H */