0
私はffmpeg libで私のコードからファイルをオープンしようとしています。そして、avformat_open_inputは、常に "No such file or directory"というエラーを受け取ります。私は別のファイルとディレクトリを試しましたが、結果は同じです。ffmpeg libからの関数avformat_open_inputはファイルを開くことができません
私がWin7の上でVS 2010を使用してhttp://ffmpeg.zeranoe.com/builds/
私のコードのビットからlibとdllファイルをコンパイル。
int decode_sound(const char * infile, const char * outfile)
{
AVFormatContext *pFormatCtx = 0;
if((err = avformat_open_input(&pFormatCtx, infile, NULL, 0)) != 0)
return 1;
}
int _tmain(int argc, _TCHAR* argv[])
{
avcodec_register_all();
cout << decode_sound("D:\\DELTA.MPG", "D:\\wav.wav") << endl;
char errbuf[128];
const char *errbuf_ptr = errbuf;
if (av_strerror(err, errbuf, sizeof(errbuf)) < 0)
strerror_s(errbuf, AVUNERROR(err));
cout << err << endl << errbuf_ptr << endl;
system("pause");
return 0;
}