[libdvbpsi-devel] fix EIT events dropping
Francois Cartegnie
git at videolan.org
Tue Feb 7 15:51:20 CET 2017
libdvbpsi | branch: branch/1.3.0-bugfix | Francois Cartegnie <fcvlcdev at free.fr> | Tue Dec 27 22:55:01 2016 +0100| [33becfcc036978c29cb88486a74b19fae3082fb0] | committer: Jean-Paul Saman
fix EIT events dropping
The EIT tables were output incomplete as the
first sections were always dropped.
(2 sections, last_section == 1)
Ex: section 1
section 0
secton 1
IsCompleteEIT is always true in first condition in that case.
It is also always true if section is N/N.
first_section > -1 && section_number == last_section because
it has just been added.
Doing the check before effectively adding the section
allows a correct evaluation against current section.
Signed-off-by: Jean-Paul Saman <jpsaman at videolan.org>
> http://git.videolan.org/gitweb.cgi/libdvbpsi.git/?a=commit;h=33becfcc036978c29cb88486a74b19fae3082fb0
---
src/tables/eit.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/tables/eit.c b/src/tables/eit.c
index fa1ae7e..0ba831c 100644
--- a/src/tables/eit.c
+++ b/src/tables/eit.c
@@ -473,6 +473,8 @@ void dvbpsi_eit_sections_gather(dvbpsi_t *p_dvbpsi, dvbpsi_decoder_t *p_private_
}
}
+ bool b_complete = dvbpsi_IsCompleteEIT(p_eit_decoder, p_section);
+
/* Add section to EIT */
if (!dvbpsi_AddSectionEIT(p_dvbpsi, p_eit_decoder, p_section))
{
@@ -486,7 +488,7 @@ void dvbpsi_eit_sections_gather(dvbpsi_t *p_dvbpsi, dvbpsi_decoder_t *p_private_
/* FIXME: p_section has just been added to the p_eit_decoder,
* Why do we have to explicitly check against it in dvbpsi_IsCompleteEIT() ?
*/
- if (dvbpsi_IsCompleteEIT(p_eit_decoder, p_section))
+ if (b_complete)
{
assert(p_eit_decoder->pf_eit_callback);
More information about the libdvbpsi-devel
mailing list