summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Hanisch <dvb@flensrocker.de>2011-02-12 20:38:14 +0100
committerLars Hanisch <dvb@flensrocker.de>2011-02-12 20:38:14 +0100
commit3fba3b329920a80febd6b6377ecfd316883f4638 (patch)
treecace19562d1392f6ecbd343fa39c9a42abc7b214
parent9218868b8aebbf83196368a1f46a911a55f2a502 (diff)
downloadvdr-plugin-pvrinput-3fba3b329920a80febd6b6377ecfd316883f4638.tar.gz
vdr-plugin-pvrinput-3fba3b329920a80febd6b6377ecfd316883f4638.tar.bz2
correct an error in device initialization if vdr is patched for dynamite but dynamite is not loaded
-rwxr-xr-xdevice.c8
-rwxr-xr-xpvrinput.c2
2 files changed, 7 insertions, 3 deletions
diff --git a/device.c b/device.c
index 4912f90..a80740e 100755
--- a/device.c
+++ b/device.c
@@ -233,6 +233,11 @@ cPvrDevice::~cPvrDevice()
bool cPvrDevice::Probe(int DeviceNumber)
{
+ // DIRTY HACK:
+ // some ivtv devices create more than one /dev/video-node
+ // so we have to be sure to grab only the right ones...
+ if (DeviceNumber >= kMaxPvrDevices)
+ return false;
struct v4l2_capability vcap;
struct v4l2_format vfmt;
int v4l2_fd;
@@ -277,9 +282,8 @@ bool cPvrDevice::Initialize(void)
if (dynamite)
cDynamicDeviceProbe::QueueDynamicDeviceCommand(ddpcAttach, *cString::sprintf("/dev/video%d", i));
else
-#else
- new cPvrDevice(i);
#endif
+ new cPvrDevice(i);
found++;
}
}
diff --git a/pvrinput.c b/pvrinput.c
index 253c357..16a9ab8 100755
--- a/pvrinput.c
+++ b/pvrinput.c
@@ -6,7 +6,7 @@
#endif
#endif
-static const char *VERSION = "2011-02-02";
+static const char *VERSION = "2011-02-12";
static const char *DESCRIPTION = tr("use Hauppauge PVR as input device");
static const char *MAINMENUENTRY = tr("PVR picture settings");