aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Paul Saman <jpsaman@videolan.org>2013-10-02 16:41:49 (GMT)
committerJean-Paul Saman <jpsaman@videolan.org>2013-11-05 07:55:02 (GMT)
commitbe874b18fa3cd3cff9d57318414d56df15c2d358 (patch)
treee22b9c31bc06de4a9bce10d0a67c14ae6473d9ee
parentb0e9500a33bd29de0d83c26e28be285b8124d5a9 (diff)
src/dvbpsi.c: b_syntax_indicator and i_table_id were used before being initialized.
(cherry picked from commit 00af91a247bc7d1fc0246fd141c2c323c983594c) Signed-off-by: Jean-Paul Saman <jpsaman@videolan.org>
-rw-r--r--src/dvbpsi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dvbpsi.c b/src/dvbpsi.c
index 4d27720..a94bd5c 100644
--- a/src/dvbpsi.c
+++ b/src/dvbpsi.c
@@ -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)

Privacy Policy