Bug in PAT generator

Johann Hanne jhml at gmx.net
Tue Sep 23 16:30:32 CEST 2003


You're right. I was mislead by the comment "header + CRC_32", actually it's
"rest of header + CRC_32", and i was using the i_length field for copying the
PSI section into a TS packet. Is there a better indicator for where the
actual PSI data is (i'm using p_data), and how long it is (i'm now using
i_length+3)?

Furthermore my assumption that creating the PAT and copying it into a TS
packet is all I have to do seems to be completely wrong, as VLC doesn't seem to
like it. Also, the PAT-TS-packets coming from the satellites seem be somewhat
different from what ISO/IEC 31818-1 says?? The section_syntax_indicator is
set to 0, the reserved bits are set to 0 (the libdvbpsi PAT creator sets them
to 1), the section_length field is always set to 0xb0 (176) and the
section_number seems to be a per-transponder constant (I got 0xe9, 0xc7 and 0xc1)...?!
Is there a extra spec for DVB PATs?

Cheers, Johann

> On Tue, Sep 23, 2003, Johann Hanne wrote:
> > Hi all,
> > 
> > PAT sections generated with dvbpsi_GenPATSections() have a wrong
> i_length
> > field. The reason for this are lines 426 and 448 in src/tables/pat.c:
> > p_current->i_length = 9;                      /* header + CRC_32 */
> > "9" is wrong. It should be 12 (8 byte header + 4 byte CRC). Thus
> replacing
> > it with
> > p_current->i_length = 12;                      /* header + CRC_32 */
> > fixes it.
> 
> Well, I don't agree, since the spec says about the "section_length"
> field :
> 
> section_length - (..) It specifies the number of bytes of the section,
> starting immediately following the section_length field, and including
> CRC. Thus, we do not take into account the first 3 bytes.
> 
> -- 
> Tristan
> 
> 
> -- 
> This is the libdvbpsi-devel mailing-list, see
> http://developers.videolan.org/
> To unsubscribe, please read http://developers.videolan.org/lists.html
> If you are in trouble, please contact <postmaster at videolan.org>
> 

-- 
This is the libdvbpsi-devel mailing-list, see http://developers.videolan.org/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the libdvbpsi-devel mailing list