mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
Send sample only if there's one to be sent.
- This issue was introduced in FreeRDP/FreeRDP@32e64c1e98 - If a sample request is received from the server before the camera provides one, an assertion is triggered because an invalid sample is attempted to be sent as a response, as the default initialization of `stream->pendingSample` sets its `length` to its `capacity`.
This commit is contained in:
@@ -451,7 +451,7 @@ static UINT ecam_dev_process_sample_request(CameraDevice* dev, GENERIC_CHANNEL_C
|
||||
|
||||
UINT ret = CHANNEL_RC_OK;
|
||||
stream->samplesRequested++;
|
||||
if (stream->pendingSample)
|
||||
if (stream->haveSample)
|
||||
ret = ecam_dev_send_pending(dev, streamIndex, stream);
|
||||
|
||||
LeaveCriticalSection(&stream->lock);
|
||||
|
||||
Reference in New Issue
Block a user