Qt中添加ffmpeg解析音乐
extern "C"
{
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
#include <libswresample/swresample.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_thread.h>
}
typedef struct PacketQueue {
AVPacketList *first_pkt, *last_pkt;
int nb_packets;
int size;
SDL_mutex *mutex;
SDL_cond *cond;
} PacketQueue;
typedef struct{
AVFormatContext* fct; //格式上下文
AVFrame *wanted_frame;//音频目标帧
AVCodecContext *acct;//音频解码上下文
AVStream *aStream;
PacketQueue audioq; //音频队列
HANDLE VideoHD;
HANDLE AudioHD;
AVCodecContext *vcct;//视频解码上下文
AVStream *vStream;
PacketQueue videoq; //视频队列
bool seek_req;
qint64 seek_pos;
double video_clock;
double audio_clock;
}mediaState;
程序运行时报错