From d9a2475c496d017cf05081a0bca4de90e2ea1623 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sun, 18 Feb 2007 11:30:38 +0100 Subject: Use strtol instead of atol to parse the value for a control. From: Hans Verkuil Setting the VIDEO_MUTE control works much better if you can enter a hexadecimal value. Signed-off-by: Hans Verkuil --- v4l2-apps/util/v4l2-ctl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'v4l2-apps/util/v4l2-ctl.cpp') diff --git a/v4l2-apps/util/v4l2-ctl.cpp b/v4l2-apps/util/v4l2-ctl.cpp index 9229732ac..11af185f7 100644 --- a/v4l2-apps/util/v4l2-ctl.cpp +++ b/v4l2-apps/util/v4l2-ctl.cpp @@ -1450,7 +1450,7 @@ int main(int argc, char **argv) struct v4l2_ext_control ctrl = { 0 }; ctrl.id = ctrl_str2id[iter->first]; - ctrl.value = atol(iter->second.c_str()); + ctrl.value = strtol(iter->second.c_str(), NULL, 0); if (V4L2_CTRL_ID2CLASS(ctrl.id) == V4L2_CTRL_CLASS_MPEG) mpeg_ctrls.push_back(ctrl); else -- cgit v1.2.3