You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-29 05:57:37 +02:00
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.
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user