cwc/mpegts dvb service: prevent auto-changes for prefcaid (see issue #2075)

This commit is contained in:
Jaroslav Kysela 2014-07-30 17:39:18 +02:00
parent 64c4a2d87c
commit e665969dfa
3 changed files with 11 additions and 1 deletions

View file

@ -782,7 +782,9 @@ forbid:
ct->cs_channel = es->es_channel;
ct->ecm_state = ECM_VALID;
if(t->s_dvb_prefcapid == 0 || t->s_dvb_prefcapid != ct->cs_channel) {
if(t->s_dvb_prefcapid == 0 ||
(t->s_dvb_prefcapid != ct->cs_channel &&
t->s_dvb_prefcapid_lock == 0)) {
t->s_dvb_prefcapid = ct->cs_channel;
tvhlog(LOG_DEBUG, "cwc", "Saving prefered PID %d for %s",
t->s_dvb_prefcapid, ct->td_nicename);

View file

@ -428,6 +428,7 @@ struct mpegts_service
uint16_t s_dvb_servicetype;
char *s_dvb_charset;
uint16_t s_dvb_prefcapid;
int s_dvb_prefcapid_lock;
/*
* EIT/EPG control

View file

@ -133,6 +133,13 @@ const idclass_t mpegts_service_class =
.off = offsetof(mpegts_service_t, s_dvb_prefcapid),
.opts = PO_ADVANCED,
},
{
.type = PT_BOOL,
.id = "prefcapid_lock",
.name = "Lock Pref. CA PID",
.off = offsetof(mpegts_service_t, s_dvb_prefcapid_lock),
.opts = PO_ADVANCED,
},
{},
}
};