在.cpp中定义全局变量
SDL_Window* screen_;
SDL_mutex* screen_mutex;
SDL_Renderer* renderer;
VideoState* global_video_state;
uint64_t global_video_pkt_pts = AV_NOPTS_VALUE;
AVPacket flush_pkt;
int video_stop = 0;
int pause_count = 0;
int bar_visibility = 0;
在.h中声明全局变量
extern SDL_Window* screen_;
extern SDL_mutex* screen_mutex;
extern SDL_Renderer* renderer;
extern VideoState* global_video_state;
extern uint64_t global_video_pkt_pts;
extern AVPacket flush_pkt;
extern int video_stop;
extern int pause_count;
extern int bar_visibility;