Skip to content

Commit 07fc865

Browse files
committed
Revert some changes
1 parent f0f6694 commit 07fc865

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Diff for: sources/grabber/v4l2/V4L2Grabber.cpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,13 @@ bool V4L2Grabber::init()
237237
continue;
238238
}
239239

240+
if (_input >= 0)
241+
{
242+
strict = true;
243+
if (val.input != _input)
244+
continue;
245+
}
246+
240247
if (_enc != PixelFormat::NO_CHANGE)
241248
{
242249
strict = true;
@@ -823,8 +830,7 @@ bool V4L2Grabber::init_device(QString selectedDeviceName, DevicePropertiesItem p
823830
// set input if needed and supported
824831
struct v4l2_input v4l2Input;
825832
CLEAR(v4l2Input);
826-
if (props.input == -1)
827-
props.input = _input;
833+
828834
v4l2Input.index = props.input;
829835

830836
if (props.input >= 0 && (xioctl(VIDIOC_ENUMINPUT, &v4l2Input) == 0))

0 commit comments

Comments
 (0)