Files
SimpleRemoter/client
yuanyuanxianganddeepseek-flash 94cb4584c8 Fix(client): keep webcam capture alive across driver quirks
Opening video management killed the client on some hosts: the DirectShow
sample callback memcpy'd into a null bitmap buffer.

IMediaControl::Run legitimately returns S_FALSE while the state change
completes asynchronously; the graph is already running and frames are
delivered. Open passed that S_FALSE to its caller, which compared against
S_OK (introduced in 8d4c118) and took the "camera failed to open" abort
path while the graph kept running; ConstructBI never allocated the buffers
and the first callback wrote to address 0.

Open now returns S_OK only when the graph is running (S_FALSE normalised)
and a failure code otherwise. BufferCB drops a frame with S_OK when the
buffer is not ready or the driver hands over more bytes than negotiated,
so the start-up race or a resolution change can neither corrupt the heap
nor stop the stream. ConstructBI validates the dimensions and allocates the
full BITMAPINFO that SendBitMapInfor copies.

Also accept FORMAT_VideoInfo2 (many built-in cameras report it, and the
cast to VIDEOINFOHEADER read garbage dimensions) and fix BindVideoFilter's
comma-expression loop that called BindToStorage with a dangling IMoniker
once enumeration ran out.

Debug and Release x64 clients build; the host that reproducibly crashed
now works.

Co-Authored-By: deepseek-flash
2026-11-21 16:44:42 +01:00
..
2026-11-14 14:30:34 +01:00
2026-11-14 14:30:34 +01:00