From a40f1ffc40a826024042c9b89a3b50ac44da7579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20T=C3=B6rblom?= Date: Tue, 9 Jul 2013 09:36:19 +0200 Subject: [PATCH 1/5] mpegts: fixed segfault caused by an incorrect pointer access when flushing subscriptions. See http://pastebin.com/GnwRJVhK for stack trace. --- src/input/mpegts/mpegts_input.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/input/mpegts/mpegts_input.c b/src/input/mpegts/mpegts_input.c index 31d20617..8463a972 100644 --- a/src/input/mpegts/mpegts_input.c +++ b/src/input/mpegts/mpegts_input.c @@ -187,7 +187,7 @@ mpegts_input_stopped_mux ( mpegts_input_t *mi, mpegts_mux_instance_t *mmi ) { char buf[256]; - service_t *s, *t; + service_t *s; mmi->mmi_mux->mm_active = NULL; LIST_REMOVE(mmi, mmi_active_link); @@ -195,11 +195,9 @@ mpegts_input_stopped_mux tvhtrace("mpegts", "%s - flush subscribers", buf); s = LIST_FIRST(&mi->mi_transports); while (s) { - t = s; - s = LIST_NEXT(t, s_active_link); - if (((mpegts_service_t*)s)->s_dvb_mux != mmi->mmi_mux) - continue; - service_remove_subscriber(s, NULL, SM_CODE_SUBSCRIPTION_OVERRIDDEN); + if (((mpegts_service_t*)s)->s_dvb_mux == mmi->mmi_mux) + service_remove_subscriber(s, NULL, SM_CODE_SUBSCRIPTION_OVERRIDDEN); + s = LIST_NEXT(s, s_active_link); } } From c49688b22a773800f50ee74285f50344e52dacfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20T=C3=B6rblom?= Date: Tue, 9 Jul 2013 12:44:27 +0200 Subject: [PATCH 2/5] iptv: added NULL termination of property lists. --- src/input/mpegts/iptv/iptv.c | 2 ++ src/input/mpegts/iptv/iptv_mux.c | 1 + 2 files changed, 3 insertions(+) diff --git a/src/input/mpegts/iptv/iptv.c b/src/input/mpegts/iptv/iptv.c index a6214d39..bad1cbab 100644 --- a/src/input/mpegts/iptv/iptv.c +++ b/src/input/mpegts/iptv/iptv.c @@ -144,6 +144,7 @@ const idclass_t iptv_input_class = { .ic_caption = "IPTV Input", .ic_get_title = iptv_input_class_get_title, .ic_properties = (const property_t[]){ + {} } }; @@ -298,6 +299,7 @@ const idclass_t iptv_network_class = { .ic_class = "iptv_network", .ic_caption = "IPTV Network", .ic_properties = (const property_t[]){ + {} } }; diff --git a/src/input/mpegts/iptv/iptv_mux.c b/src/input/mpegts/iptv/iptv_mux.c index d0dd2062..86b288e2 100644 --- a/src/input/mpegts/iptv/iptv_mux.c +++ b/src/input/mpegts/iptv/iptv_mux.c @@ -38,6 +38,7 @@ const idclass_t iptv_mux_class = { PROPDEF1("iptv_interface", "Interface", PT_STR, iptv_mux_t, mm_iptv_interface) }, #endif + {} } }; From 118475f2482aa80dbc9d3d5218252114be38b86a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20T=C3=B6rblom?= Date: Tue, 9 Jul 2013 13:36:51 +0200 Subject: [PATCH 3/5] linuxdvb: cosmetics to mux parameter units, e.g frequency. --- src/input/mpegts/linuxdvb/linuxdvb_mux.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/input/mpegts/linuxdvb/linuxdvb_mux.c b/src/input/mpegts/linuxdvb/linuxdvb_mux.c index 02905c73..817ba559 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_mux.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_mux.c @@ -178,7 +178,7 @@ const idclass_t linuxdvb_mux_dvbt_class = { .type = PT_U32, .id = "frequency", - .name = "Frequency (MHz)", + .name = "Frequency (Hz)", .opts = PO_WRONCE, .off = offsetof(linuxdvb_mux_t, lm_tuning.dmc_fe_params.frequency), }, @@ -245,14 +245,14 @@ const idclass_t linuxdvb_mux_dvbc_class = { .type = PT_U32, .id = "frequency", - .name = "Frequency (MHz)", + .name = "Frequency (Hz)", .opts = PO_WRONCE, .off = offsetof(linuxdvb_mux_t, lm_tuning.dmc_fe_params.frequency), }, { .type = PT_U32, .id = "symbolrate", - .name = "Symbol Rate", + .name = "Symbol Rate (S/s)", .opts = PO_WRONCE, .off = offsetof(linuxdvb_mux_t, lm_tuning.dmc_fe_params.u.qam.symbol_rate), }, @@ -329,14 +329,14 @@ const idclass_t linuxdvb_mux_dvbs_class = { .type = PT_U32, .id = "frequency", - .name = "Frequency (MHz)", + .name = "Frequency (kHz)", .opts = PO_WRONCE, .off = offsetof(linuxdvb_mux_t, lm_tuning.dmc_fe_params.frequency), }, { .type = PT_U32, .id = "symbolrate", - .name = "Symbol Rate", + .name = "Symbol Rate (S/s)", .opts = PO_WRONCE, .off = offsetof(linuxdvb_mux_t, lm_tuning.dmc_fe_params.u.qpsk.symbol_rate), }, From 559091c060ae5f445891700de2140e32b851dae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20T=C3=B6rblom?= Date: Tue, 9 Jul 2013 13:50:50 +0200 Subject: [PATCH 4/5] dvb-c: default to SYS_DVBC_ANNEX_AC --- src/input/mpegts/dvb_support.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input/mpegts/dvb_support.c b/src/input/mpegts/dvb_support.c index 431e1934..023d3000 100644 --- a/src/input/mpegts/dvb_support.c +++ b/src/input/mpegts/dvb_support.c @@ -652,7 +652,7 @@ dvb_mux_conf_load ( fe_type_t type, dvb_mux_conf_t *dmc, htsmsg_t *m ) str = htsmsg_get_str(m, "delsys"); if (!str || (r = dvb_str2delsys(str)) < 0) { if (type == FE_OFDM) r = SYS_DVBT; - else if (type == FE_QAM) r = SYS_DVBC_ANNEX_B; + else if (type == FE_QAM) r = SYS_DVBC_ANNEX_AC; else if (type == FE_QPSK) r = SYS_DVBS; else if (type == FE_ATSC) r = SYS_ATSC; else From 14753a36d1d03b9bc0380c309c73a2397a312bf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20T=C3=B6rblom?= Date: Tue, 9 Jul 2013 13:58:56 +0200 Subject: [PATCH 5/5] linuxtv: cosmetics --- src/input/mpegts/linuxdvb/linuxdvb_mux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/input/mpegts/linuxdvb/linuxdvb_mux.c b/src/input/mpegts/linuxdvb/linuxdvb_mux.c index 817ba559..40ea6835 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_mux.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_mux.c @@ -252,7 +252,7 @@ const idclass_t linuxdvb_mux_dvbc_class = { .type = PT_U32, .id = "symbolrate", - .name = "Symbol Rate (S/s)", + .name = "Symbol Rate (Sym/s)", .opts = PO_WRONCE, .off = offsetof(linuxdvb_mux_t, lm_tuning.dmc_fe_params.u.qam.symbol_rate), }, @@ -336,7 +336,7 @@ const idclass_t linuxdvb_mux_dvbs_class = { .type = PT_U32, .id = "symbolrate", - .name = "Symbol Rate (S/s)", + .name = "Symbol Rate (Sym/s)", .opts = PO_WRONCE, .off = offsetof(linuxdvb_mux_t, lm_tuning.dmc_fe_params.u.qpsk.symbol_rate), },