首先avcodec_alloc_frame()这个函数在2.2及以前的版本可以找到,但是在2.3开始就被
av_frame_alloc()取代。
在网上找到这样一个例子,引自哪里暂时找不到了
#include "libavformat/avformat.h"
#include "libavcodec/avcodec.h"
#include "libavutil/avutil.h"
#include "stdio.h"
int main(int argc, char* argv[])
{
printf("going to av_register_all\n");
av_register_all();
return 0;
}
可使用如下命令编译
gcc -o test ./peg.c -lavformat -lavcodec -lavutil -lz -lm -lpthread -lbz2 -lswresample -llzma