From 261536c48fe3095632f5bd0f653f7715fd962555 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 13 Aug 2014 16:53:58 +0200 Subject: [PATCH] SAT>IP: Fix the master tuner function - fixes#2174 --- src/input/mpegts/satip/satip_satconf.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/input/mpegts/satip/satip_satconf.c b/src/input/mpegts/satip/satip_satconf.c index 97f6edb5..4f6d01f6 100644 --- a/src/input/mpegts/satip/satip_satconf.c +++ b/src/input/mpegts/satip/satip_satconf.c @@ -48,7 +48,20 @@ int satip_satconf_get_position ( satip_frontend_t *lfe, mpegts_mux_t *mm ) { - satip_satconf_t *sfc = satip_satconf_find_ele(lfe, mm); + satip_satconf_t *sfc; + satip_frontend_t *lfe2; + if (lfe->sf_master) { + TAILQ_FOREACH(lfe2, &lfe->sf_device->sd_frontends, sf_link) + if (lfe2->sf_number != lfe->sf_number && + lfe2->sf_number == lfe->sf_master && + lfe2->sf_master == 0) { + lfe = lfe2; + goto found; + } + return 0; + } +found: + sfc = satip_satconf_find_ele(lfe, mm); return sfc && sfc->sfc_enabled ? sfc->sfc_position : 0; }