[libdvbpsi-devel] Is this a bug?(About multi-sections)
Jean-Paul Saman
jpsaman at videolan.org
Wed Dec 5 09:26:37 CET 2012
HI,
On Wed, Dec 5, 2012 at 8:45 AM, jiangpengfei <jiangpengfei at orientview.com>wrote:
> Hi everyone:****
>
> I tested the libdvbpsi v1.0.0 pre2 in my project today, I found there is a
> problem when libdvbpsi handles a table which split into multi-sections.***
> *
>
> My network is a DVB network, and there is a NIT split into two
> sections(the last section number is 1). In the test, I found only the
> information in the last section of NIT had been handled in the most
> conditions, the sec0’s data couldn’t be handled correctly. After read
> libdvbpsi’s source code, I found this function:
> dvbpsi_decoder_psi_sections_completed verifies if a table’s sections have
> been gathered completely. But I think this
> condition(p_decoder->i_last_section_number == p->i_number) is not perfect,
> because if the first section I received is last section of table, this
> condition will be true and will active the callback I registered. So I
> change the function implement to the following:
>
It does not sound logical to transmit the last part of a multi section psi
before sending other parts. I'll check with the official standards if this
behaviour is allowed.
Does your own equipment generate this transport stream with multi-section
psi tables?
Could you provide me with a sample file?
Kind regards,
Jean-Paul Saman.
> ****
>
> bool dvbpsi_decoder_psi_sections_completed(dvbpsi_decoder_t* p_decoder)***
> *
>
> {****
>
> assert(p_decoder);****
>
> assert(p_decoder->i_last_section_number <= 255);****
>
> ** **
>
> bool b_complete = true;****
>
> ** **
>
> /* dvbpsi_psi_section_t *p = p_decoder->p_sections;****
>
> * while (p)****
>
> * {****
>
> * if (p_decoder->i_last_section_number == p->i_number)****
>
> * b_complete = true;****
>
> * p = p->p_next;****
>
> * }****
>
> */****
>
> int i;****
>
> ** **
>
> for(i = 0; i <= p_decoder->i_last_section_number; i ++)****
>
> {****
>
> dvbpsi_psi_section_t * p = p_decoder->p_sections;****
>
> ** **
>
> while(p)****
>
> {****
>
> if(i == p->i_number)****
>
> break;****
>
> ** **
>
> p = p->p_next;****
>
> }****
>
> ** **
>
> if(p == NULL)****
>
> b_complete = false;****
>
> }****
>
> ** **
>
> return b_complete;****
>
> }****
>
> ** **
>
> After recompile, the libdvbpsi can handle my NIT correctly. ****
>
> I’m a newer of libdvbpsi, I don’t want change any code of it, so can
> anyone tell me this is a bug or I misunderstand something?****
>
> ** **
>
> Fred from China. ****
>
> _______________________________________________
> libdvbpsi-devel mailing list
> libdvbpsi-devel at videolan.org
> http://mailman.videolan.org/listinfo/libdvbpsi-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/libdvbpsi-devel/attachments/20121205/c3fe855f/attachment.html>
More information about the libdvbpsi-devel
mailing list