Ticket #9247: hdhrtunerfix.diff

File hdhrtunerfix.diff, 1.1 KB (added by robertm, 15 years ago)

Probable HDHR tuner fix

  • mythtv/libs/libmythhdhomerun/hdhomerun_device.c

    diff --git a/mythtv/libs/libmythhdhomerun/hdhomerun_device.c b/mythtv/libs/libmythhdhomerun/hdhomerun_device.c
    index ce03a7a..d2a4ef5 100644
    a b static struct hdhomerun_device_t *hdhomerun_device_create_from_str_ip(const char  
    216216{
    217217        unsigned long a[4];
    218218        unsigned int port = 0;
     219        unsigned int tuner = 0;
    219220        if (sscanf(device_str, "%lu.%lu.%lu.%lu:%u", &a[0], &a[1], &a[2], &a[3], &port) != 5) {
    220                 if (sscanf(device_str, "%lu.%lu.%lu.%lu", &a[0], &a[1], &a[2], &a[3]) != 4) {
     221                if (sscanf(device_str, "%lu.%lu.%lu.%lu-%u", &a[0], &a[1], &a[2], &a[3], &tuner) != 5) {
    221222                        return NULL;
    222223                }
    223224        }
    224225
    225226        unsigned long device_ip = (a[0] << 24) | (a[1] << 16) | (a[2] << 8) | (a[3] << 0);
    226         struct hdhomerun_device_t *hd = hdhomerun_device_create(HDHOMERUN_DEVICE_ID_WILDCARD, (uint32_t)device_ip, 0, dbg);
     227        struct hdhomerun_device_t *hd = hdhomerun_device_create(HDHOMERUN_DEVICE_ID_WILDCARD, (uint32_t)device_ip, tuner, dbg);
    227228        if (!hd) {
    228229                return NULL;
    229230        }