dvb: ensure that we only create radio/tv services from SDT
This commit is contained in:
parent
a582fe7c7b
commit
cedd06468d
3 changed files with 35 additions and 20 deletions
|
@ -387,12 +387,6 @@ dvb_sdt_callback(th_dvb_mux_instance_t *tdmi, uint8_t *ptr, int len,
|
|||
if(dllen > len)
|
||||
break;
|
||||
|
||||
if (!(t = dvb_service_find(tdmi, service_id, 0, NULL))) {
|
||||
len -= dllen;
|
||||
ptr += dllen;
|
||||
continue;
|
||||
}
|
||||
|
||||
stype = 0;
|
||||
chname = NULL;
|
||||
*crid = 0;
|
||||
|
@ -436,7 +430,14 @@ dvb_sdt_callback(th_dvb_mux_instance_t *tdmi, uint8_t *ptr, int len,
|
|||
}
|
||||
len -= dlen; ptr += dlen; dllen -= dlen;
|
||||
}
|
||||
|
||||
if (!servicetype_is_tv(stype) &&
|
||||
!servicetype_is_radio(stype))
|
||||
continue;
|
||||
|
||||
if (!(t = dvb_service_find(tdmi, service_id, 0, NULL)))
|
||||
continue;
|
||||
|
||||
if(t->s_servicetype != stype ||
|
||||
t->s_scrambled != free_ca_mode) {
|
||||
t->s_servicetype = stype;
|
||||
|
|
|
@ -777,30 +777,40 @@ service_servicetype_txt(service_t *t)
|
|||
*
|
||||
*/
|
||||
int
|
||||
service_is_tv(service_t *t)
|
||||
servicetype_is_tv(int servicetype)
|
||||
{
|
||||
return
|
||||
t->s_servicetype == ST_SDTV ||
|
||||
t->s_servicetype == ST_HDTV ||
|
||||
t->s_servicetype == ST_EX_HDTV ||
|
||||
t->s_servicetype == ST_EX_SDTV ||
|
||||
t->s_servicetype == ST_EP_HDTV ||
|
||||
t->s_servicetype == ST_ET_HDTV ||
|
||||
t->s_servicetype == ST_DN_SDTV ||
|
||||
t->s_servicetype == ST_DN_HDTV ||
|
||||
t->s_servicetype == ST_SK_SDTV ||
|
||||
t->s_servicetype == ST_NE_SDTV ||
|
||||
t->s_servicetype == ST_AC_SDTV ||
|
||||
t->s_servicetype == ST_AC_HDTV;
|
||||
servicetype == ST_SDTV ||
|
||||
servicetype == ST_HDTV ||
|
||||
servicetype == ST_EX_HDTV ||
|
||||
servicetype == ST_EX_SDTV ||
|
||||
servicetype == ST_EP_HDTV ||
|
||||
servicetype == ST_ET_HDTV ||
|
||||
servicetype == ST_DN_SDTV ||
|
||||
servicetype == ST_DN_HDTV ||
|
||||
servicetype == ST_SK_SDTV ||
|
||||
servicetype == ST_NE_SDTV ||
|
||||
servicetype == ST_AC_SDTV ||
|
||||
servicetype == ST_AC_HDTV;
|
||||
}
|
||||
int
|
||||
service_is_tv(service_t *t)
|
||||
{
|
||||
return servicetype_is_tv(t->s_servicetype);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
int
|
||||
servicetype_is_radio(int servicetype)
|
||||
{
|
||||
return servicetype == ST_RADIO;
|
||||
}
|
||||
int
|
||||
service_is_radio(service_t *t)
|
||||
{
|
||||
return t->s_servicetype == ST_RADIO;
|
||||
return servicetype_is_radio(t->s_servicetype);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -551,6 +551,10 @@ int service_is_tv(service_t *t);
|
|||
|
||||
int service_is_radio(service_t *t);
|
||||
|
||||
int servicetype_is_tv(int st);
|
||||
|
||||
int servicetype_is_radio(int st);
|
||||
|
||||
void service_destroy(service_t *t);
|
||||
|
||||
void service_remove_subscriber(service_t *t, struct th_subscription *s,
|
||||
|
|
Loading…
Add table
Reference in a new issue