Fix crash caused by screen capturer or mouse controller init failed on Linux and MacOS

This commit is contained in:
dijunkun
2024-05-23 15:48:10 +08:00
parent 70be1d8afc
commit 8807636372
7 changed files with 49 additions and 15 deletions

View File

@@ -61,6 +61,8 @@ class ScreenCapturerX11 : public ScreenCapturer {
int videoindex_ = 0;
int got_picture_ = 0;
int fps_ = 0;
bool inited_ = false;
// ffmpeg
AVFormatContext *pFormatCtx_ = nullptr;
AVCodecContext *pCodecCtx_ = nullptr;