From 8e63b7fefabb40069a765f33a53bb42f9f38f27b Mon Sep 17 00:00:00 2001 From: Dw9 Date: Mon, 18 Jul 2022 22:30:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84test=5Fplayer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- player/YuvDisplayer.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/player/YuvDisplayer.h b/player/YuvDisplayer.h index 737350e3..d2defc74 100644 --- a/player/YuvDisplayer.h +++ b/player/YuvDisplayer.h @@ -55,11 +55,11 @@ public: while(flag){ SDL_WaitEvent(&event); switch (event.type){ - case REFRESH_EVENT:{ + case REFRESH_EVENT: { { std::lock_guard lck(_mtxTask); if (_taskList.empty()) { - //not reachable + // not reachable continue; } task = _taskList.front(); @@ -67,7 +67,8 @@ public: } flag = task(); break; - case SDL_QUIT: + } + case SDL_QUIT:{ InfoL << event.type; return; } @@ -168,7 +169,7 @@ public: } } if (_texture) { -#if (SDL_PATCHLEVEL >= 16 || SDL_MINOR_VERSION > 0) +#if SDL_VERSION_ATLEAST(2,0,16) //需要更新sdl到最新(>=2.0.16) if (pFrame->format == AV_PIX_FMT_NV12) { SDL_UpdateNVTexture(