Re: Section CRC not being checked
Brad Bitterman <[email protected]>
| Newsgroups | gmane.comp.video.videolan.libdvbpsi.devel |
|---|---|
| Message-ID | <[email protected]> |
The patch works.
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:
if (p_decoder->p_building_mgt)
return false;
Shouldn't it be this:
if (!p_decoder->p_building_mgt)
return false;
Thanks,
Brad Bitterman
[email protected]
On Oct 2, 2013, at 12:48 PM, Jean-Paul Saman <[email protected]> wrote:
> Brad,
>
> On Wed, Oct 2, 2013 at 5:27 PM, Brad Bitterman <[email protected]> wrote:
> 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.
>
> 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.
>
> 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?
>
> Good catch it is indeed a bug. Could you try attached patch?
>
> Kind regards,
>
> Jean-Paul Saman
> <0001-src-dvbpsi.c-b_syntax_indicator-and-i_table_id-were-.patch>
_______________________________________________
libdvbpsi-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libdvbpsi-devel
signature.asc
(application/pgp-signature, 235 B)
-----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iF4EAREIAAYFAlJMUcgACgkQoT6fpi0w1TfG4wD6A74Wl29UEMDB1IDSw9oMDRY6 1ZFCA8xtirmzXcf8inoA/jyqW/QlHy7sIJbaJb4ZdsSXjZbNG8Uy/r3kwERdSFYn =IktJ -----END PGP SIGNATURE-----