Commit ffdba2ec authored by Jean-Paul Saman's avatar Jean-Paul Saman

SIS: splice_command_length is 12 bits (max 0xfff)

parent dcc43a21
...@@ -441,11 +441,9 @@ void dvbpsi_sis_sections_decode(dvbpsi_t* p_dvbpsi, dvbpsi_sis_t* p_sis, ...@@ -441,11 +441,9 @@ void dvbpsi_sis_sections_decode(dvbpsi_t* p_dvbpsi, dvbpsi_sis_t* p_sis,
p_sis->i_splice_command_type = p_byte[13]; p_sis->i_splice_command_type = p_byte[13];
uint32_t i_splice_command_length = p_sis->i_splice_command_length; uint32_t i_splice_command_length = p_sis->i_splice_command_length;
if (p_sis->i_splice_command_length == 0xfff) assert(p_sis->i_splice_command_length <= 0xfff);
{ if (p_sis->i_splice_command_length > 0xfff)
/* FIXME: size 0xfff of splice_command_section is undefined */ p_sis->i_splice_command_length = 0xfff; /* truncate */
assert(p_sis->i_splice_command_length != 0xfff);
}
/* FIXME: handle splice_command_sections */ /* FIXME: handle splice_command_sections */
switch(p_sis->i_splice_command_type) switch(p_sis->i_splice_command_type)
...@@ -535,11 +533,11 @@ dvbpsi_psi_section_t *dvbpsi_sis_sections_generate(dvbpsi_t *p_dvbpsi, dvbpsi_si ...@@ -535,11 +533,11 @@ dvbpsi_psi_section_t *dvbpsi_sis_sections_generate(dvbpsi_t *p_dvbpsi, dvbpsi_si
p_current->p_data[13] = p_sis->i_splice_command_type; p_current->p_data[13] = p_sis->i_splice_command_type;
uint32_t i_desc_start = 13 + p_sis->i_splice_command_length; uint32_t i_desc_start = 13 + p_sis->i_splice_command_length;
if (p_sis->i_splice_command_length == 0xfff) i_desc_start++; /* descriptor loop starts here */
{
/* FIXME: size 0xfff of splice_command_section is undefined */ assert(p_sis->i_splice_command_length <= 0xfff);
assert(p_sis->i_splice_command_length != 0xfff); if (p_sis->i_splice_command_length > 0xfff)
} p_sis->i_splice_command_length = 0xfff; /* truncate */
/* FIXME: handle splice_command_sections */ /* FIXME: handle splice_command_sections */
......
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