mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 03:31:45 +08:00
无音频时生成静音音频,防止播放器加载画面太慢
修复MAC下SDL必须在主线程渲染的问题
This commit is contained in:
@@ -42,6 +42,8 @@ using namespace ZL::Util;
|
||||
|
||||
#define REFRESH_EVENT (SDL_USEREVENT + 1)
|
||||
|
||||
|
||||
#ifndef __MACH__
|
||||
class SDLDisplayerHelper
|
||||
{
|
||||
public:
|
||||
@@ -104,6 +106,8 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#endif //__MACH__
|
||||
|
||||
class YuvDisplayer {
|
||||
public:
|
||||
YuvDisplayer(void *hwnd = nullptr,const char *title = "untitled"){
|
||||
@@ -121,7 +125,9 @@ public:
|
||||
},nullptr);
|
||||
InfoL << "SDL_Init";
|
||||
}, []() {
|
||||
#ifndef __MACH__
|
||||
SDLDisplayerHelper::Destory();
|
||||
#endif
|
||||
SDL_Quit();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user