<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">The patch works.<div><br></div><div>On another note, in atsc_mgt.c I think there might be an issue in dvbpsi_AddSectionMGT. At line 387 there is a check to see if p_decoder->p_building_mgt gets created from the call to dvbpsi_atsc_NewMGT. The check is as follows:</div><div><br></div><div><div>if (p_decoder->p_building_mgt)</div><div> return false;</div><div><br></div><div>Shouldn't it be this:</div><div><br></div><div><div>if (!p_decoder->p_building_mgt)</div><div> return false;</div></div><div><br></div><div>Thanks,</div><div><br></div><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><div>Brad Bitterman</div><div><a href="mailto:bitter@vtilt.com">bitter@vtilt.com</a></div><div><br></div></span><br class="Apple-interchange-newline">
</div>
<br><div><div>On Oct 2, 2013, at 12:48 PM, Jean-Paul Saman <<a href="mailto:jpsaman@videolan.org">jpsaman@videolan.org</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Brad,<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 2, 2013 at 5:27 PM, Brad Bitterman <span dir="ltr"><<a href="mailto:bitter@vtilt.com" target="_blank">bitter@vtilt.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">We were testing libdvbpsi 1.1.0 with an ATSC tuner and found that we were getting corrupted data sometimes for the VCT. After looking at the code we found that the CRC was not being checked. <div>
<br></div><div>In the function dvbpsi_packet_push around line 400 the boolean variable is declared and initialized by calling dvbpsi_has_crc( p_section ). This function uses p_section->b_syntax_indicator to check to see if the CRC should be validated. The p_section->b_syntax_indicator is not initialized until a few lines down. This cause the CRC to never be check. </div>
<div><br></div><div>I moved the call to dvbpsi_has_crc down after b_syntax_indicator gets initialized and I now see the CRC check happening. Is this correct or is there a reason that the code is the way it is?</div></div>
</blockquote><div><br></div><div>Good catch it is indeed a bug. Could you try attached patch?<br> <br>Kind regards,<br><br></div><div>Jean-Paul Saman<br></div></div></div></div>
<span><0001-src-dvbpsi.c-b_syntax_indicator-and-i_table_id-were-.patch></span></blockquote></div><br></div></body></html>