Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
cwc/mpegts dvb service: prevent auto-changes for prefcaid (see issue …
…#2075)
  • Loading branch information
perexg committed Jul 30, 2014
1 parent 64c4a2d commit e665969
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/descrambler/cwc.c
Expand Up @@ -782,7 +782,9 @@ handle_ecm_reply(cwc_service_t *ct, ecm_section_t *es, uint8_t *msg,
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);
Expand Down
1 change: 1 addition & 0 deletions src/input/mpegts.h
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions src/input/mpegts/mpegts_service.c
Expand Up @@ -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,
},
{},
}
};
Expand Down

0 comments on commit e665969

Please sign in to comment.