Opt: skip 8MB raw first-frame in H264 mode; server unlocks on first IDR instead

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
yuanyuanxiang
2026-06-15 19:39:49 +02:00
parent 2765d95950
commit abafd673a2
2 changed files with 14 additions and 0 deletions

View File

@@ -1478,6 +1478,11 @@ VOID CScreenSpyDlg::DrawNextScreenDiff(bool keyFrame)
if (!m_bHide) {
if (Decode((LPBYTE)NextScreenData, NextScreenLength)) {
bChange = TRUE;
// 解码成功即代表 IDR 参考帧已建立(编码器首帧强制 IDR解除门控。
// 不依赖 IsAnyKeyframe某些硬编输出格式或解码器首帧 EAGAIN 延迟会导致
// 关键帧检测误判,进而让 m_bIsFirst 永久为 TRUE"请等待"卡死)。
if (m_bIsFirst)
m_bIsFirst = FALSE;
}
}
// Broadcast video frame to web clients (only for Web session dialogs)