Commit 8e63b7fe by Dw9

完善test_player

parent 305722e5
...@@ -55,11 +55,11 @@ public: ...@@ -55,11 +55,11 @@ public:
while(flag){ while(flag){
SDL_WaitEvent(&event); SDL_WaitEvent(&event);
switch (event.type){ switch (event.type){
case REFRESH_EVENT:{ case REFRESH_EVENT: {
{ {
std::lock_guard<std::mutex> lck(_mtxTask); std::lock_guard<std::mutex> lck(_mtxTask);
if (_taskList.empty()) { if (_taskList.empty()) {
//not reachable // not reachable
continue; continue;
} }
task = _taskList.front(); task = _taskList.front();
...@@ -67,7 +67,8 @@ public: ...@@ -67,7 +67,8 @@ public:
} }
flag = task(); flag = task();
break; break;
case SDL_QUIT: }
case SDL_QUIT:{
InfoL << event.type; InfoL << event.type;
return; return;
} }
...@@ -168,7 +169,7 @@ public: ...@@ -168,7 +169,7 @@ public:
} }
} }
if (_texture) { if (_texture) {
#if (SDL_PATCHLEVEL >= 16 || SDL_MINOR_VERSION > 0) #if SDL_VERSION_ATLEAST(2,0,16)
//需要更新sdl到最新(>=2.0.16) //需要更新sdl到最新(>=2.0.16)
if (pFrame->format == AV_PIX_FMT_NV12) { if (pFrame->format == AV_PIX_FMT_NV12) {
SDL_UpdateNVTexture( SDL_UpdateNVTexture(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论