Re: Is this a bug?(About multi-sections)
Josep Maria Galcerán <[email protected]>
| Newsgroups | gmane.comp.video.videolan.libdvbpsi.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all, from ISO/IEC 13818-1, Annex C, C.2 iii): "The section_number field allows the sections of a particular table to be reassembled in their original order by the decoder. There is no obligation within this Recommendation | International Standard that sections must be transmitted in numerical order, but this is recommended, unless it is desired to transmit some sections of the table more frequently than others, e.g. due to random access considerations." Regards Josep Al 05/12/2012 09:26, En/na Jean-Paul Saman ha escrit: HI, On Wed, Dec 5, 2012 at 8:45 AM, jiangpengfei <[email protected] > 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 [email protected] http://mailman.videolan.org/listinfo/libdvbpsi-devel _______________________________________________ libdvbpsi-devel mailing list [email protected] http://mailman.videolan.org/listinfo/libdvbpsi-devel _______________________________________________ libdvbpsi-devel mailing list [email protected] http://mailman.videolan.org/listinfo/libdvbpsi-devel