ffmpeg源码简析(五)编码——avformat_alloc_output_context2(),avcodec_encode_video2()
1.avformat_alloc_output_context2()在基于FFmpeg的视音频编码器程序中,该函数通常是第一个调用的函数(除了组件注册函数av_register_all())。avformat_alloc_output_context2()函数可以初始化一个用于输出的AVFormatContext结构体。它的声明位于libavformat\avformat.h,如下所示。intav