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

src/dvbpsi.c: b_syntax_indicator and i_table_id were used before being initialized.

(cherry picked from commit 00af91a2)
Signed-off-by: default avatarJean-Paul Saman <jpsaman@videolan.org>
parent b0e9500a
......@@ -404,13 +404,15 @@ bool dvbpsi_packet_push(dvbpsi_t *p_dvbpsi, uint8_t* p_data)
else
{
bool b_valid_crc32 = false;
bool has_crc32 = dvbpsi_has_CRC32(p_section);
bool has_crc32;
/* PSI section is complete */
p_section->i_table_id = p_section->p_data[0];
p_section->b_syntax_indicator = p_section->p_data[1] & 0x80;
p_section->b_private_indicator = p_section->p_data[1] & 0x40;
/* Update the end of the payload if CRC_32 is present */
has_crc32 = dvbpsi_has_CRC32(p_section);
if (p_section->b_syntax_indicator || has_crc32)
p_section->p_payload_end -= 4;
......@@ -421,7 +423,6 @@ bool dvbpsi_packet_push(dvbpsi_t *p_dvbpsi, uint8_t* p_data)
if (!has_crc32 || b_valid_crc32)
{
/* PSI section is valid */
p_section->i_table_id = p_section->p_data[0];
if (p_section->b_syntax_indicator)
{
p_section->i_extension = (p_section->p_data[3] << 8)
......
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