Merge pull request #12272 from akallabeth/rdpecam-sws-fix

[channels,rdpecam] fix sws context checks
This commit is contained in:
akallabeth
2026-02-08 16:53:51 +01:00
committed by GitHub
2 changed files with 1 additions and 4 deletions

View File

@@ -168,7 +168,7 @@ static UINT ecam_dev_sample_captured_callback(CameraDevice* dev, int streamIndex
{
WINPR_ASSERT(dev);
if (streamIndex >= ECAM_DEVICE_MAX_STREAMS)
if ((streamIndex >= ECAM_DEVICE_MAX_STREAMS) || (streamIndex < 0))
return ERROR_INVALID_INDEX;
CameraDeviceStream* stream = &dev->streams[streamIndex];

View File

@@ -328,9 +328,6 @@ static BOOL ecam_encoder_compress_h264(CameraDeviceStream* stream, const BYTE* s
CAM_MEDIA_FORMAT inputFormat = streamInputFormat(stream);
enum AVPixelFormat pixFormat = AV_PIX_FMT_NONE;
if (!ecam_sws_valid(stream))
return FALSE;
#if defined(WITH_INPUT_FORMAT_H264)
if (inputFormat == CAM_MEDIA_FORMAT_MJPG_H264)
{