mirror of
https://github.com/sol1/rustguac.git
synced 2026-09-10 09:35:45 +00:00
175c30b705
The H.264 decode path bypassed the Guacamole sync mechanism — the sync response fired immediately without waiting for WebCodecs to finish decoding. guacd thought the client was keeping up and sent at full rate, causing the decode queue to grow without bound (30+ seconds of lag observed over time). Fix: gate the sync response on H.264 decode completion so guacd gets real backpressure. Also drop delta frames when the decode queue exceeds 5 frames as a safety valve for transient overload (tab backgrounding). - Add pending-decode tracking and per-frame position capture to H264Decoder.js (fixes shared mutable state race) - Add waitForPending() with 1s safety timeout for sync gating - Add frame dropping when decodeQueueSize > 5 (never drops keyframes) - Add stats() method for console debugging (__guac_client._h264Decoder.stats()) - Gate sync response in Client.js on H.264 decode completion Closes #93