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:
eduar-hte
2025-12-10 14:54:11 +00:00
parent 433bbe80db
commit d3fdbbe8cf

View File

@@ -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);