[fix] only send hostname and resolution before sending first frame

This commit is contained in:
dijunkun
2025-04-14 16:49:31 +08:00
parent b7ce8b6299
commit 2774991107

View File

@@ -194,7 +194,8 @@ int Render::StartScreenCapturer() {
int screen_capturer_init_ret = screen_capturer_->Init( int screen_capturer_init_ret = screen_capturer_->Init(
60, [this](unsigned char* data, int size, int width, int height) -> void { 60, [this](unsigned char* data, int size, int width, int height) -> void {
if (!hostname_sent_ && width > 0 && height > 0) { if (!hostname_sent_ && width > 0 && height > 0 &&
start_screen_capturer_) {
original_display_width_ = width; original_display_width_ = width;
original_display_height_ = height; original_display_height_ = height;
std::string host_name = GetHostName(); std::string host_name = GetHostName();