From: Jaroslav Kysela Date: Fri, 16 Oct 2015 14:06:26 +0000 (+0200) Subject: IPTV: move the service create logic to the proper location X-Git-Tag: v4.2.1~1896 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=151683e39461bf742450e7ad438fb2410c375f5f;p=thirdparty%2Ftvheadend.git IPTV: move the service create logic to the proper location --- diff --git a/src/input/mpegts/iptv/iptv_auto.c b/src/input/mpegts/iptv/iptv_auto.c index 0d222556e..cd0548e27 100644 --- a/src/input/mpegts/iptv/iptv_auto.c +++ b/src/input/mpegts/iptv/iptv_auto.c @@ -101,7 +101,6 @@ iptv_auto_network_process_m3u_item(iptv_network_t *in, htsmsg_t *conf; mpegts_mux_t *mm; iptv_mux_t *im; - iptv_service_t *ms; url_t u; int change; http_arg_list_t args; @@ -231,16 +230,6 @@ iptv_auto_network_process_m3u_item(iptv_network_t *in, (*count)++; } - if (in->in_service_id) { - conf = htsmsg_create_map(); - htsmsg_add_u32(conf, "sid", in->in_service_id); - htsmsg_add_u32(conf, "dvb_servicetype", 1); /* SDTV */ - ms = iptv_service_create0(im, 0, 0, NULL, conf); - htsmsg_destroy(conf); - if (ms) - iptv_bouquet_trigger(in, 0); - } - end: free(x); urlreset(&u); diff --git a/src/input/mpegts/iptv/iptv_mux.c b/src/input/mpegts/iptv/iptv_mux.c index ff706e639..a7c01a671 100644 --- a/src/input/mpegts/iptv/iptv_mux.c +++ b/src/input/mpegts/iptv/iptv_mux.c @@ -283,6 +283,7 @@ iptv_mux_create0 ( iptv_network_t *in, const char *uuid, htsmsg_t *conf ) { htsmsg_t *c, *e; htsmsg_field_t *f; + iptv_service_t *ms; char ubuf[UUID_HEX_SIZE]; /* Create Mux */ @@ -314,6 +315,14 @@ iptv_mux_create0 ( iptv_network_t *in, const char *uuid, htsmsg_t *conf ) if (!(e = htsmsg_field_get_map(f))) continue; (void)iptv_service_create0(im, 0, 0, f->hmf_name, e); } + } else if (in->in_service_id) { + conf = htsmsg_create_map(); + htsmsg_add_u32(conf, "sid", in->in_service_id); + htsmsg_add_u32(conf, "dvb_servicetype", 1); /* SDTV */ + ms = iptv_service_create0(im, 0, 0, NULL, conf); + htsmsg_destroy(conf); + if (ms) + iptv_bouquet_trigger(in, 0); } htsmsg_destroy(c);