Commit bfa4aaeb authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: vidtv: fix service_id at SDT table

The service_id there should be equal to the one used
on other tables, otherwise, EIT entries won't be valid.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 11f4933f
......@@ -424,7 +424,8 @@ int vidtv_channel_si_init(struct vidtv_mux *m)
if (!m->si.pat)
return -ENOMEM;
m->si.sdt = vidtv_psi_sdt_table_init(m->transport_stream_id);
m->si.sdt = vidtv_psi_sdt_table_init(m->network_id,
m->transport_stream_id);
if (!m->si.sdt)
goto free_pat;
......
......@@ -1271,7 +1271,8 @@ void vidtv_psi_pmt_table_destroy(struct vidtv_psi_table_pmt *pmt)
kfree(pmt);
}
struct vidtv_psi_table_sdt *vidtv_psi_sdt_table_init(u16 transport_stream_id)
struct vidtv_psi_table_sdt *vidtv_psi_sdt_table_init(u16 network_id,
u16 transport_stream_id)
{
struct vidtv_psi_table_sdt *sdt;
const u16 RESERVED = 0xff;
......@@ -1307,7 +1308,7 @@ struct vidtv_psi_table_sdt *vidtv_psi_sdt_table_init(u16 transport_stream_id)
* This can be changed to something more useful, when support for
* NIT gets added
*/
sdt->network_id = cpu_to_be16(0xff01);
sdt->network_id = cpu_to_be16(network_id);
sdt->reserved = RESERVED;
vidtv_psi_sdt_table_update_sec_len(sdt);
......
......@@ -366,7 +366,8 @@ struct vidtv_psi_table_pat *vidtv_psi_pat_table_init(u16 transport_stream_id);
struct vidtv_psi_table_pmt *vidtv_psi_pmt_table_init(u16 program_number,
u16 pcr_pid);
struct vidtv_psi_table_sdt *vidtv_psi_sdt_table_init(u16 transport_stream_id);
struct vidtv_psi_table_sdt *vidtv_psi_sdt_table_init(u16 network_id,
u16 transport_stream_id);
struct vidtv_psi_table_sdt_service*
vidtv_psi_sdt_service_init(struct vidtv_psi_table_sdt_service *head,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment