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

src/tables/cat.c: Cleanup

Remove b_append from dvbpsi_GatherCATSections()
parent 9e0d751e
......@@ -166,7 +166,6 @@ void dvbpsi_GatherCATSections(dvbpsi_t *p_dvbpsi,
dvbpsi_cat_decoder_t* p_cat_decoder
= (dvbpsi_cat_decoder_t*)p_dvbpsi->p_private;
bool b_append = true;
bool b_reinit = false;
if (p_section->i_table_id != 0x01)
......@@ -179,7 +178,7 @@ void dvbpsi_GatherCATSections(dvbpsi_t *p_dvbpsi,
return;
}
if (b_append && !p_section->b_syntax_indicator)
if (!p_section->b_syntax_indicator)
{
/* Invalid section_syntax_indicator */
dvbpsi_error(p_dvbpsi, "CAT decoder",
......@@ -195,8 +194,6 @@ void dvbpsi_GatherCATSections(dvbpsi_t *p_dvbpsi,
p_section->i_number, p_section->i_last_number,
p_section->b_current_next);
if (b_append)
{
/* TS discontinuity check */
if (p_cat_decoder->b_discontinuity)
{
......@@ -216,8 +213,7 @@ void dvbpsi_GatherCATSections(dvbpsi_t *p_dvbpsi,
" whereas no discontinuity has occured");
b_reinit = true;
}
else if (p_cat_decoder->i_last_section_number
!= p_section->i_last_number)
else if (p_cat_decoder->i_last_section_number != p_section->i_last_number)
{
/* last_section_number */
dvbpsi_error(p_dvbpsi, "CAT decoder",
......@@ -239,7 +235,6 @@ void dvbpsi_GatherCATSections(dvbpsi_t *p_dvbpsi,
}
}
}
}
/* Reinit the decoder if wanted */
if (b_reinit)
......@@ -263,9 +258,6 @@ void dvbpsi_GatherCATSections(dvbpsi_t *p_dvbpsi,
}
}
/* Append the section to the list if wanted */
if (b_append)
{
int b_complete = false;
/* Initialize the structures if it's the first section received */
......@@ -304,7 +296,7 @@ void dvbpsi_GatherCATSections(dvbpsi_t *p_dvbpsi,
{
/* Save the current information */
p_cat_decoder->current_cat = *p_cat_decoder->p_building_cat;
p_cat_decoder->b_current_valid = 1;
p_cat_decoder->b_current_valid = true;
/* Chain the sections */
if (p_cat_decoder->i_last_section_number)
{
......@@ -324,11 +316,6 @@ void dvbpsi_GatherCATSections(dvbpsi_t *p_dvbpsi,
for (unsigned int i = 0; i <= p_cat_decoder->i_last_section_number; i++)
p_cat_decoder->ap_sections[i] = NULL;
}
}
else
{
dvbpsi_DeletePSISections(p_section);
}
}
/*****************************************************************************
......
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