准备容器结构体,用于打开媒体文件并读取信息
创建 AVFormatContext
AVFormatContext
AVFormatContext *fmt_ctx = NULL;
【可选】使用 avformat_alloc_context 手动分配(很多时候由 avformat_open_input 自动完成)
avformat_alloc_context
avformat_open_input
打开媒体文件并读取格式头部信息
avformat_open_input()
avformat_find_stream_i