1. 编写可执行文件
vim mediainfo_new.c
#include<stdio.h>
#include<libavutil/log.h>
#include <libavformat/avformat.h>
int main(int argc, char *argv[])
{
int err_code;
AVFormatContext *fmt_ctx = NULL;
av_log_set_level(AV_LOG_DEBUG);
if(argc < 2){
av_log(NULL,AV_LOG_ERROR, "[Usage]you should input media file!\n");
return -1;
}
char *src_filename = argv[1];
//av_register_all();
/* open input file, and allocate format context */
if