diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-12 08:10:28 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-12 08:10:28 -0300 |
commit | 6ced02a5fd04c06f95dc3b445f994315ebcd88fd (patch) | |
tree | 3a49369264fc9ba7447fae747b3c3b1944e21162 /v4l2-apps/util | |
parent | 1f67505822974b7eb72ea3bfdad7de8d992118a6 (diff) | |
download | mediapointer-dvb-s2-6ced02a5fd04c06f95dc3b445f994315ebcd88fd.tar.gz mediapointer-dvb-s2-6ced02a5fd04c06f95dc3b445f994315ebcd88fd.tar.bz2 |
Fix tuner max range
From: Mauro Carvalho Chehab <mchehab@infradead.org>
By default, tuner-core reports max range as the maximum possible
unsigned int. Since qv4l2 uses QSpinBox to display frequency ranges, and
this waits for a signed integer, it is considering the maximum value as
being -1.
This hack will trunc any value bigger than the maximum signed integer to
the max value.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---
v4l2-apps/util/qv4l2/general-tab.cpp | 2 ++
1 file changed, 2 insertions(+)
Diffstat (limited to 'v4l2-apps/util')
-rw-r--r-- | v4l2-apps/util/qv4l2/general-tab.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/v4l2-apps/util/qv4l2/general-tab.cpp b/v4l2-apps/util/qv4l2/general-tab.cpp index 87a0f520d..93ab329ba 100644 --- a/v4l2-apps/util/qv4l2/general-tab.cpp +++ b/v4l2-apps/util/qv4l2/general-tab.cpp @@ -41,6 +41,8 @@ GeneralTab::GeneralTab(int _fd, int n, QWidget *parent) : memset(&tuner, 0, sizeof(tuner)); ioctl(fd, VIDIOC_G_TUNER, &tuner); + if (tuner.rangehigh>INT_MAX) + tuner.rangehigh=INT_MAX; struct v4l2_input vin; memset(&vin, 0, sizeof(vin)); |