qv4l2: always do updateVidCapFormat when changing crop/compose
authorHans Verkuil <hansverk@cisco.com>
Wed, 16 Jul 2014 11:47:10 +0000 (13:47 +0200)
committerHans Verkuil <hansverk@cisco.com>
Wed, 16 Jul 2014 11:47:10 +0000 (13:47 +0200)
Changing the crop size can change the format size at the same
time, so we need to update all the formatting parameters.

Signed-off-by: Hans Verkuil <hansverk@cisco.com>
utils/qv4l2/general-tab.cpp

index 8bcd60b..716bd7a 100644 (file)
@@ -1451,10 +1451,8 @@ void GeneralTab::cropChanged()
        crop.c.left = m_cropLeft->value();
        crop.c.height = m_cropHeight->value();
        crop.c.top = m_cropTop->value();
-       if (ioctl("Set Crop Rectangle", VIDIOC_S_CROP, &crop))
-               updateVidCapFormat();
-       else
-               updateCrop();
+       ioctl("Set Crop Rectangle", VIDIOC_S_CROP, &crop);
+       updateVidCapFormat();
 }
 
 void GeneralTab::composeChanged()
@@ -1470,10 +1468,8 @@ void GeneralTab::composeChanged()
        sel.r.left = m_composeLeft->value();
        sel.r.height = m_composeHeight->value();
        sel.r.top = m_composeTop->value();
-       if (ioctl("Set Compose Rectangle", VIDIOC_S_SELECTION, &sel))
-               updateVidCapFormat();
-       else
-               updateCompose();
+       ioctl("Set Compose Rectangle", VIDIOC_S_SELECTION, &sel);
+       updateVidCapFormat();
 }
 
 void GeneralTab::updateVideoInput()