首先看一下FFmpeg关于该packet函数的注释: int avcodec_send_packet ( AVCodecContext * avctx, const AVPacket * avpkt ) Supply raw packet data as input to a decoder. Internally, this call will copy relevant AVCodecContext fields, which can influence decod
#include <stdio.h> #include <libavcodec/avcodec.h> #include <libavformat/avformat.h> #include <libswscale/swscale.h> #include <libavutil/imgutils.h> void SaveFrame(AVFrame *pFrame, int width, int height, int iFrame); int main