mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 00:14:11 +09:00
Merge pull request #12272 from akallabeth/rdpecam-sws-fix
[channels,rdpecam] fix sws context checks
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user