avcodec_find_encoder() 用于查找 FFmpeg 的编码器,avcodec_find_decoder() 用于查找

avcodec_find_encoder() 用于查找 FFmpeg 的编码器,avcodec_find_decoder() 用于查找 FFmpeg 的解码器,声明都位于 libavcodec\avcodec.h。其原型如下:

// 函数的参数是一个编码器的ID,返回查找到的编码器(没有找到就返回NULL)。 AVCodec *avcodec_find_encoder(enum AVCodecID id); // 函数的参数是一个解码器的ID,返回查找到的解码器(没有找到就返回NULL)。 AVCodec *avcodec_find_decoder(enum AVCodecID id);