summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert McNamara <rmcnamara@mythtv.org>2011-06-19 14:35:26 (GMT)
committer Robert McNamara <rmcnamara@mythtv.org>2011-06-19 14:35:26 (GMT)
commit0b88b99c23c4c5152fb986163fe31d628ac60173 (patch)
tree0dd2521c6836498128b89de3597dd45f1a163330
parent4a795bc0d91645e3b6b4c97d5a1030bdd4edaafc (diff)
HDHomeRun: Fix capture failures when HDHR is defined by IP.
Around a year ago, SiliconDust modified the hdhomerun_device_create_from_str_ip to hardcode tuner 0 rather than parse it from the device string. This appears to have been a simple oversight, since the equivalent string parsing function by device ID still does parse for the tuner number. This restores the logic to parse for the tuner number rather than just unequivocally use tuner 0. Refs #8193. Refs #9247.
-rw-r--r--mythtv/libs/libmythhdhomerun/hdhomerun_device.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mythtv/libs/libmythhdhomerun/hdhomerun_device.c b/mythtv/libs/libmythhdhomerun/hdhomerun_device.c
index dae549b..fe500c5 100644
--- a/mythtv/libs/libmythhdhomerun/hdhomerun_device.c
+++ b/mythtv/libs/libmythhdhomerun/hdhomerun_device.c
@@ -216,14 +216,15 @@ static struct hdhomerun_device_t *hdhomerun_device_create_from_str_ip(const char
{
unsigned long a[4];
unsigned int port = 0;
+ unsigned int tuner = 0;
if (sscanf(device_str, "%lu.%lu.%lu.%lu:%u", &a[0], &a[1], &a[2], &a[3], &port) != 5) {
- if (sscanf(device_str, "%lu.%lu.%lu.%lu", &a[0], &a[1], &a[2], &a[3]) != 4) {
+ if (sscanf(device_str, "%lu.%lu.%lu.%lu-%u", &a[0], &a[1], &a[2], &a[3], &tuner) != 5) {
return NULL;
}
}
unsigned long device_ip = (a[0] << 24) | (a[1] << 16) | (a[2] << 8) | (a[3] << 0);
- struct hdhomerun_device_t *hd = hdhomerun_device_create(HDHOMERUN_DEVICE_ID_WILDCARD, (uint32_t)device_ip, 0, dbg);
+ struct hdhomerun_device_t *hd = hdhomerun_device_create(HDHOMERUN_DEVICE_ID_WILDCARD, (uint32_t)device_ip, tuner, dbg);
if (!hd) {
return NULL;
}