C++/Qt에서 Windows에서 ffmpeg 라이브러리를 사용하려고합니다. 이것은 내 주요 기능입니다 :C++/Qt FFmpeg 라이브러리 오류 : 프로그램이 예기치 않게 종료되었습니다.
#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;
#define INT64_C(val) val##LL
#define UINT64_C(val) val##ULL
#include <QtCore>
#include <SDL/SDL.h>
#ifdef __MINGW32__
#undef main
#endif
//--------------- FFMPEG Headers and Libraries ---------------
extern "C"
{
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
}
int main(int c, char *args[])
{
av_register_all();
AVFormatContext *ctx;
if(avformat_open_input(&ctx,"salam.avi",NULL,NULL)!=0)
return -1;
return 0;
}
& 링크가 잘 맞습니다. 하지만 실행하려고하면이 오류가 발생합니다.
프로그램이 예기치 않게 종료했습니다.
* avformat_open_input * 기능에서 발생합니다. 뭐가 문제 야? 그것은 내 코드에 관한 것입니까, 아니면 내 라이브러리에 문제입니까?
미리 감사드립니다.