linuxdvb: fix service configuration loading
This is what was causing the duplicate service entries, it was simply not loading the old configuration properly and thus creating new entries.
This commit is contained in:
parent
fbd34be472
commit
8e6d14b635
3 changed files with 5 additions and 3 deletions
|
@ -214,7 +214,6 @@ linuxdvb_mux_create0
|
|||
if (c) {
|
||||
HTSMSG_FOREACH(f, c) {
|
||||
if (!(e = htsmsg_get_map_by_field(f))) continue;
|
||||
if (!(e = htsmsg_get_map(e, "config"))) continue;
|
||||
(void)linuxdvb_service_create0(lm, 0, 0, f->hmf_name, e);
|
||||
}
|
||||
htsmsg_destroy(c);
|
||||
|
|
|
@ -234,8 +234,10 @@ mpegts_service_create0
|
|||
|
||||
sbuf_init(&s->s_tsbuf);
|
||||
|
||||
s->s_dvb_service_id = sid;
|
||||
s->s_pmt_pid = pmt_pid;
|
||||
if (!conf) {
|
||||
if (sid) s->s_dvb_service_id = sid;
|
||||
if (pmt_pid) s->s_pmt_pid = pmt_pid;
|
||||
}
|
||||
s->s_dvb_mux = mm;
|
||||
LIST_INSERT_HEAD(&mm->mm_services, s, s_dvb_mux_link);
|
||||
|
||||
|
|
|
@ -101,6 +101,7 @@ prop_read_value(void *obj, const property_t *p, htsmsg_t *m, const char *name)
|
|||
break;
|
||||
case PT_INT:
|
||||
htsmsg_add_s64(m, name, *(int *)val);
|
||||
break;
|
||||
case PT_U32:
|
||||
htsmsg_add_u32(m, name, *(uint32_t *)val);
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue