草庐IT

AVFormatContext

全部标签

c# - 我有 .H 文件,如何将其公共(public)方法打开到 .Net 库?

我有这样的.H文件(来自here)/*FFmpegsimpleEncoder*/#ifndef__VIDEO_ENCODER_H__#define__VIDEO_ENCODER_H__#include"ffmpegInclude.h"#include#includeclassVideoEncoder{private://outputfilenamestd::stringoutputFilename;//outputformat.AVOutputFormat*pOutFormat;//formatcontextAVFormatContext*pFormatContext;//videos

c++ - avformat_open_input 函数崩溃

我正在尝试使用avformat_open_input打开一个文件,即使该文件存在,它也会崩溃。av_register_all();AVFormatContext*avFormatContext;if(avformat_open_input(&avFormatContext,argv[1],NULL,NULL) 最佳答案 您必须先将avFormatContext变量设为NULL:av_register_all();AVFormatContext*avFormatContext=NULL;if(avformat_open_input(&